-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add workflow to run tests in pull requests
- Loading branch information
1 parent
6820cbc
commit 381b965
Showing
2 changed files
with
54 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Tests | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "service/**/*" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Configure runner | ||
run: | | ||
./devcontainer/configure_docker.sh | ||
shell: bash | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
|
||
- name: Yarn install | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: install | ||
dir: service | ||
|
||
- name: Start dependencies | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: deps:start | ||
dir: service | ||
|
||
- name: Prepare database | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: db:migrate | ||
dir: service | ||
|
||
- name: Run tests | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: test | ||
dir: service | ||
|
||
- name: Clean dependencies | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: deps:down | ||
dir: service |