-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (36 loc) · 1.14 KB
/
main.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Run CI
run-name: Running unit tests on ${{ github.actor }}'s ${{ github.head_ref }} branch
on: [pull_request]
jobs:
pull_request_ci:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v3
- name: Add nodeLinker to node-modules
run: |
echo "nodeLinker: node-modules" >> .yarnrc.yml
working-directory: ${{ github.workspace }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup docker-compose
uses: KengoTODA/actions-setup-docker-compose@v1.0.9
with:
version: '2.12.2'
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Setup Docker container
run: docker-compose run --detach --service-ports test-db
- name: Sleep for 5 seconds
run: sleep 5s
shell: bash
- name: Migrate database
run: yarn test:migrate:latest
- name: Run seed files
run: yarn test:seed
- name: Run unit tests
run: yarn test:unit