-
Notifications
You must be signed in to change notification settings - Fork 26
80 lines (66 loc) · 2.06 KB
/
ci.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
name: 'CI workflow'
on:
workflow_dispatch:
pull_request_target:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
build:
# TODO: template for build to DRY for CI and for publish workflows
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout non PR
uses: actions/[email protected]
# Do not trigger a checkout when opening PRs from a fork (helps avoid
# "pwn request". See https://docs.github.com/en/actions/reference/events-that-trigger-workflows#pull_request_target )
if: github.event_name != 'pull_request_target'
with:
fetch-depth: '0'
- name: Checkout PR
uses: actions/[email protected]
if: github.event_name == 'pull_request_target'
with:
ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: '0'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- run: yarn install --frozen-lockfile
- name: validate config
run: yarn backstage-cli config:check --lax
- name: lint
run: yarn backstage-cli repo lint
- name: type checking and declarations
run: yarn tsc:full
- name: build
run: yarn backstage-cli repo build --all
env:
CI: true
- name: verify type dependencies
run: yarn lint:type-deps
- name: test
run: |
yarn backstage-cli repo test --maxWorkers=3 --workerIdleMemoryLimit=1300M
# Playwright e2e tests
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Run Playwright tests
run: yarn test:e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload e2e tests result
uses: actions/upload-artifact@v3
if: always()
with:
name: e2e-test-report
path: e2e-test-report/
retention-days: 30