-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (53 loc) · 1.52 KB
/
publish.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
name: Publish
on:
push:
branches:
- main
permissions:
id-token: write
contents: write
pull-requests: write
env:
AWS_REGION: eu-west-2
AWS_ACCOUNT_ID: '094954420758'
concurrency:
group: publish-main
jobs:
build:
if: github.run_number != 1
name: CDP-build-workflow
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create Test Coverage Reports
run: |
npm ci
npm audit --omit=dev
npm run build
npm test
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
- name: Start docker compose
env:
NOTIFY_TEMPLATE_ID: ${{ secrets.NOTIFY_TEMPLATE_ID }}
NOTIFY_API_KEY: ${{ secrets.NOTIFY_API_KEY }}
NOTIFY_CASE_DELIVERY_EMAIL_ADDRESS: ${{ secrets.NOTIFY_CASE_DELIVERY_EMAIL_ADDRESS }}
run: |
docker compose up --wait-timeout 300 -d --quiet-pull
- name: Browserstack initial tests
run: |
npm run user-journey-test:bs
env:
BROWSERSTACK_USER: ${{ secrets.BROWSERSTACK_USER }}
BROWSERSTACK_KEY: ${{ secrets.BROWSERSTACK_KEY }}
- name: cleanup
if: always()
run: docker compose down
- name: Build and Publish
uses: DEFRA/cdp-build-action/build@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}