-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (82 loc) · 2.61 KB
/
release.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
name: Release
on:
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
- name: Setup Node.js 16.x
uses: actions/setup-node@v2.4.0
with:
node-version: 16.x
- name: Install Dependencies
run: npm ci
- name: Test
run: npm test
- name: Upload Test Artifacts - coverage/
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: coverage-16.x
path: ${{ github.workspace }}/coverage/
retention-days: 1
- name: Upload Test Coverage - Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v2.0.2
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build
run: npm run build
- name: Test E2E
run: npm run test:e2e:docker
- name: Upload Test E2E Artifacts - cypress/videos/
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: cypress-videos-16.x
path: ${{ github.workspace }}/cypress/videos/
retention-days: 1
- name: Upload Test E2E Artifacts - cypress/screenshots/
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: cypress-screenshots-16.x
path: ${{ github.workspace }}/cypress/screenshots/
retention-days: 1
- name: Test Visual
run: npm run test:visual:docker
- name: Compress Test Visual Artifacts
if: ${{ always() }}
run: |
find . -name '__diff_output__' | tar -cvjf tests-visual-job-artifacts.tar.bz2 --files-from -
- name: Upload Test Visual Artifacts - tests-visual-job-artifacts.tar.bz2
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: tests-visual-job-artifacts-16.x.tar.bz2
path: ${{ github.workspace }}/tests-visual-job-artifacts.tar.bz2
retention-days: 1
- name: Upload Build Artifacts - public/
uses: actions/upload-artifact@v2
with:
name: public-16.x
path: ${{ github.workspace }}/public/
retention-days: 1
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run release
- name: Deploy UAT
env:
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
run: |
if [[ -n ${NETLIFY_SITE_ID} && -n ${NETLIFY_AUTH_TOKEN} ]] ; then
npm run deploy:uat
fi