Running unit tests on klau1011's combine-page-description-tables branch #31
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
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 | |