-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: working github action unit tests
- Loading branch information
Si
committed
Oct 12, 2022
1 parent
c3dbc6a
commit 71e5a87
Showing
1 changed file
with
23 additions
and
7 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,20 +1,36 @@ | ||
name: Unit tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- features/** | ||
- dependabot/** | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
unit: | ||
docker: | ||
timeout-minutes: 10 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- uses: actions/setup-node@v2 | ||
- name: Start containers | ||
run: docker-compose -f "docker-compose.test.yml" up -d --build | ||
|
||
- name: Install our packages | ||
- name: Install node | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: 14.x | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
- name: Run our tests | ||
run: yarn test | ||
- name: Run tests | ||
run: yarn test:all --exit | ||
|
||
- name: Stop containers | ||
if: always() | ||
run: docker-compose -f "docker-compose.yml" down |