-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (51 loc) · 1.39 KB
/
build.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Build
on:
push:
branches-ignore:
- 'chore(release): *'
tags-ignore:
- 'v*'
pull_request:
tags-ignore:
- 'v*'
concurrency: ${{ github.ref }}
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Install NodeJs 14
uses: actions/setup-node@v1
with:
node-version: 14
- name: Yarn Install
run: yarn install
- name: Lint
run: yarn lint
- name: Prettier
run: yarn prettier
- name: Build Server Docker image
uses: docker/build-push-action@v2
with:
file: docker/server/Dockerfile
tags: tunjudge/server:latest
- name: Build Judge Docker image
uses: docker/build-push-action@v2
with:
file: docker/judge/Dockerfile
tags: tunjudge/judge:latest
- name: Start Application
run: docker-compose -f docker-compose.test.yml up -d
- name: Integration tests
uses: cypress-io/github-action@v2
with:
working-directory: tests
install: false
browser: chrome
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Stop Application
run: docker-compose -f docker-compose.test.yml down