-
Notifications
You must be signed in to change notification settings - Fork 4
147 lines (133 loc) · 3.69 KB
/
staging.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
name: Staging
on:
push:
branches: [master]
jobs:
test_competition:
name: "Test competition"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/competition_spec.js
test_dictionary:
name: "Test dictionary"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/dictionary_spec.js
test_flashcards:
name: "Test flashcards"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/flashcards_spec.js
test_follow_and_block:
name: "Test follow and block"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/follow_and_block_spec.js
test_groups:
name: "Test groups"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/groups_spec.js
test_mobvita:
name: "Test mobvita"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/mobvita_spec.js
test_practice:
name: "Test practice"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/practice_spec.js
test_tests:
name: "Test tests"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/tests_spec.js
test_wordnest:
name: "Test wordnest"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 'Run tests'
uses: ./.github/actions/run_test
with:
spec: cypress/e2e/wordnest_spec.js
build:
name: 'Publish to dockerhub'
needs:
- test_competition
- test_dictionary
- test_flashcards
- test_follow_and_block
- test_groups
- test_mobvita
- test_practice
- test_tests
- test_wordnest
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Publish to DockerHub
uses: docker/[email protected]
with:
repository: toska/mobvita
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
build_args: ENVIRONMENT=staging,REVITA_URL=https://revita-test.cs.helsinki.fi/api,COMMIT_HASH=${{ github.sha }}
tags: staging
sentry:
name: "Sentry"
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Pull image and create a container
run: docker create --name mobvita toska/mobvita:staging
- name: Copy assets from the container
run: docker cp mobvita:usr/src/app/dist ./app
- name: Create Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_URL: https://toska.cs.helsinki.fi/
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: toska
SENTRY_PROJECT: mobvita
with:
environment: staging
set_commits: 'skip'
sourcemaps: ./app
url_prefix: '~/app'