forked from siemens/ngx-datatable
-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (90 loc) · 2.71 KB
/
Copy pathtest_and_deploy.yml
File metadata and controls
111 lines (90 loc) · 2.71 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: Build, Test, and Deploy
on:
workflow_call:
secrets:
CC_TEST_REPORTER_ID:
required: true
pull_request:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0 # We need this for commit-lint
- name: Set Node Version
uses: actions/setup-node@v6
with:
node-version: lts/krypton
- name: Install
run: npm ci
- name: Build and package library
run: npm run package
- name: Format
run: npm run format:check
- name: Build
run: npm run build:prod
- name: Archive build
uses: actions/upload-artifact@v7
with:
name: dist
path: dist
- name: Install chromium
run: npx playwright install --with-deps chromium
- name: Test
run: npm run ci
- name: Build Stackblitz
working-directory: projects/stackblitz
run: |
npm ci
npm run build -- --configuration=production
- name: Archive coverage results
uses: actions/upload-artifact@v7
if: success() || failure()
with:
name: coverage
path: coverage/ngx-datatable-lib
- name: Publish coverage results
uses: qltysh/qlty-action/coverage@v2
env:
QLTY_COVERAGE_TOKEN: ${{ secrets.QLTY_COVERAGE_TOKEN }}
with:
token: ${{ secrets.QLTY_COVERAGE_TOKEN }}
files: ${{github.workspace}}/coverage/ngx-datatable-lib/lcov.info
if: env.QLTY_COVERAGE_TOKEN
e2e:
runs-on: ubuntu-latest
needs: build
container: mcr.microsoft.com/playwright:v1.59.1-jammy
steps:
# We cannot use built-in LFS functionality due to the missing support of custom LFS endpoints.
# See: https://github.com/actions/checkout/issues/365
# As we are in another container, we even need to install LFS manually.
- name: Install LFS
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
apt install git-lfs
- name: Checkout
uses: actions/checkout@v6
- name: Pull Repository with LFS
run: git lfs pull
- name: Download build
uses: actions/download-artifact@v8
with:
name: dist
path: dist
- name: Install
run: npm ci
- name: E2E
run: npm run e2e
- name: Upload E2E Results
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: e2e-results
path: playwright/results