forked from swimlane/ngx-datatable
-
Notifications
You must be signed in to change notification settings - Fork 26
87 lines (68 loc) · 2.11 KB
/
test_and_deploy.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
name: Build, Test, and Deploy
on: [pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Node Version
uses: actions/setup-node@v4
with:
node-version: lts/iron
# We cannot use built-in LFS functionality due to the missing support of custom LFS endpoints.
# See: https://github.com/actions/checkout/issues/365
- name: Pull Repository with LFS
run: git lfs pull
- 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
- name: Archive build
uses: actions/upload-artifact@v4
with:
name: build
path: dist/ngx-datatable
- name: Test
run: npm run ci
- name: Build Docs
run: npm run build-docs
- name: Deploy Docs
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: dist/ngx-datatable
if: ${{ github.ref == 'refs/heads/master' }}
e2e:
runs-on: ubuntu-latest
needs: build
container: mcr.microsoft.com/playwright:v1.46.0-jammy
steps:
# The LFS situation is even worse here. As we are in another container, we 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@v4
- name: Pull Repository with LFS
run: git lfs pull
- name: Download build
uses: actions/download-artifact@v4
with:
name: build
path: dist/ngx-datatable
- name: Install
run: npm ci
- name: E2E
run: npm run e2e
- name: Upload E2E Results
uses: actions/upload-artifact@v4
with:
name: e2e-results
path: playwright/results