-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (28 loc) · 1.07 KB
/
build-tests.yml
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
name: build-tests
on:
pull_request:
jobs:
unit-testing:
runs-on: ubuntu-latest
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
steps:
- uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20.14.0'
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install Docker Compose
run: sudo apt-get update && sudo apt-get install -y docker-compose
- name: Build Docker Image
run: docker build -t codehammers/ch-dev-dep-v3:latest -f Dockerfile-dev .
- name: Install Root Dependencies
run: docker run codehammers/ch-dev-dep-v3:latest npm install
- name: Install Client Dependencies
run: docker run codehammers/ch-dev-dep-v3:latest /bin/sh -c "cd client && npm install"
- run: LINT_COMMAND=lint docker-compose -f docker-compose-lint.yml up --abort-on-container-exit
- run: docker-compose -f docker-compose-test.yml up --abort-on-container-exit
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}