-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (45 loc) · 1.15 KB
/
main_push.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
name: Production
on:
push:
branches:
- main
paths-ignore:
- 'documents/**'
- 'README.md'
jobs:
test:
runs-on: ubuntu-18.04
services:
mongo:
image: healthcheck/mongo
ports:
- 27017:27017
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '14.x'
- name: npm install and test client
run: |
cd client
npm install
CI=true npm test
- name: npm install and test server
run: |
cd server
npm install
npm test
- name: e2e tests
uses: cypress-io/github-action@v2
with:
working-directory: e2e_tests
command: npm run test:e2e:prod
start: npm run start:test
wait-on: http://localhost:3001
- name: Publish to DockerHub
uses: docker/[email protected]
with:
repository: ${{ secrets.DOCKER_USERNAME }}/${{ secrets.DOCKER_REPOSITORY }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
tags: production