-
Notifications
You must be signed in to change notification settings - Fork 2
92 lines (91 loc) · 3 KB
/
test.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
on:
pull_request:
workflow_dispatch:
name: test
jobs:
eslint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run lint
commit-lint:
runs-on: ubuntu-latest
name: Validate all commits
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Conventional Commits Checker
uses: netodevel/[email protected]
id: commits-check
with:
target-branch: ${{ github.event.pull_request.base.ref }}
current-branch: ${{ github.event.pull_request.head.ref }}
pattern: '^\s*(feat|fix|ci|chore|docs|test|style|refactor)(\(.{1,}\))?!?: .{1,}$'
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
- run: npm ci
- run: npm run build
test:
timeout-minutes: 15
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
instance:
- compose-service: shopware
APP_URL: http://localhost:8011
- compose-service: shopware-65
APP_URL: http://localhost:8021
env:
APP_URL: ${{ matrix.instance.APP_URL }}
WEBSERVER_COMMAND: '' # this will disable the log output
steps:
- uses: actions/checkout@v4
- name: Compose up ${{ matrix.instance.compose-service }}
run: docker compose up -d --pull=always --quiet-pull ${{ matrix.instance.compose-service }}
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests ${{ matrix.instance.compose-service }}
run: npx playwright test --repeat-each 4
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.instance.compose-service }}
path: test-results/
retention-days: 7
test-saas:
timeout-minutes: 15
runs-on: ubuntu-latest
concurrency: saas # only allow one job at a time
env:
APP_URL: ${{ secrets.SAAS_APP_URL }}
SHOPWARE_ADMIN_USERNAME: ${{ secrets.SAAS_SHOPWARE_ADMIN_USERNAME }}
SHOPWARE_ADMIN_PASSWORD: ${{ secrets.SAAS_SHOPWARE_ADMIN_PASSWORD }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test --repeat-each 2