-
Notifications
You must be signed in to change notification settings - Fork 6
59 lines (59 loc) · 1.96 KB
/
main.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
name: Application CI
on: [push, pull_request]
jobs:
pipeline:
name: blog pipeline
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]') && !contains(github.event.pull_request.title, '[skip ci]') && !contains(github.event.pull_request.title, '[ci skip]')"
timeout-minutes: 40
env:
NODE_VERSION: 20.15.0
SPRING_OUTPUT_ANSI_ENABLED: DETECT
SPRING_JPA_SHOW_SQL: false
JHI_DISABLE_WEBPACK_LOGS: true
NG_CLI_ANALYTICS: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.15.0
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- name: Install Node.js packages
run: npm install
- name: Install Snyk CLI
run: |
curl --compressed https://static.snyk.io/cli/latest/snyk-linux -o snyk
chmod +x snyk
- name: Snyk test
continue-on-error: true
run: ./snyk test --all-projects
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Snyk monitor
continue-on-error: true
run: ./snyk monitor --all-projects
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
- name: Run backend test
run: |
chmod +x mvnw
npm run ci:backend:test
- name: Run frontend test
run: npm run ci:frontend:test
- name: Package application
run: npm run java:jar:prod
- name: 'E2E: Package'
run: npm run ci:e2e:package
- name: 'E2E: Prepare'
run: npm run ci:e2e:prepare
- name: 'E2E: Run'
run: npm run ci:e2e:run
env:
CYPRESS_ENABLE_RECORD: false
CYPRESS_PROJECT_ID: ${{ secrets.CYPRESS_PROJECT_ID }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
- name: 'E2E: Teardown'
run: npm run ci:e2e:teardown