-
Notifications
You must be signed in to change notification settings - Fork 2
58 lines (46 loc) · 1.24 KB
/
docker.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
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
name: Docker Image CI
on:
pull_request:
branches:
- main
- dev
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: isbang/[email protected]
with:
compose-file: "compose.yml"
- name: Wait for containers to start
run: |
sleep 18
docker run \
--rm \
--network mercury-project_default \
alpine/curl -o /dev/null --retry 3 --retry-connrefused backend:5000
- name: Test the backend
run: cd backend; npm i && npm run test run
- name: Format files
run: npm i && npm run prettier:fix
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Apply formatting
branch: ${{ github.head_ref }}
cypress:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.ref }}
- uses: isbang/[email protected]
with:
compose-file: "compose.yml"
- name: Run Cypress Tests
run: cd frontend; npm i && npm run cy:run