-
Notifications
You must be signed in to change notification settings - Fork 4
42 lines (35 loc) · 1.13 KB
/
build-and-test.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
39
40
41
42
name: Build and Test
on:
push:
branches:
- development
pull_request:
branches:
- master
- development
env:
COMPOSE_DOCKER_CLI_BUILD: 1
DOCKER_BUILDKIT: 1
GITHUB_ACTIONS_ENV: 1
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 16.14
- uses: actions/checkout@v3
- name: Build code
run: |
docker-compose -f docker-compose.dev.yml run --entrypoint='/bin/bash -c "lerna bootstrap && lerna run build --ignore client"' dev-setup
echo "REACT_APP_HOST_NAME=events.md.cap.gov" >> packages/client/.env
echo "REACT_APP_RECAPTCHA_KEY={{ secrets.RECAPTCHA_PUBLIC_KEY }}" >> packages/client/.env
echo "SKIP_PREFLIGHT_CHECK=true" >> packages/client/.env
yarn run --cwd=packages/client build
- name: Test code
run: |
sudo systemctl start mysql.service
yarn run --cwd=packages/server-jest-config test
yarn run --cwd=packages/server-common test
yarn run --cwd=packages/server test
yarn run --cwd=packages/client test