-
-
Notifications
You must be signed in to change notification settings - Fork 135
93 lines (75 loc) · 3.08 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
81
82
83
84
85
86
87
88
89
90
91
92
93
name: CI
on:
- push
- pull_request
# Allow running manually
- workflow_dispatch
jobs:
# Tests the list of offline files in the Service Worker and compares it to the contents of the www directory
tests-files-build-windows:
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Test the list of offline files in Service Worker
shell: pwsh
run: ./scripts/Check-OfflineFilesList.ps1
- name: Test that the app can be built
shell: pwsh
run: npm run build
# This job runs always, including for remote pull requests, and
# has external dependencies or special permission needs, besides a
# local install of Node.js, Firefox, and Chromium or Chrome.
#
# You can run these same tests locally in your own developer
# environment via `npm ci && npm test`.
tests-unit-linux:
# We want to run on external PRs, but not on our own internal PRs as they'll be run by the push to the branch
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-20.04
steps:
# Clone the repo and checkout the commit for which the workflow was triggered
- uses: actions/checkout@v3
- name: Test integrity of app parameters
shell: bash
run: |
# Check that values of assetsCache and appVersion are correctly duplicated
chmod +x ./scripts/test_duplicate_values.sh
./scripts/test_duplicate_values.sh
# Check that PWAServer is correctly set in app.js
chmod +x ./scripts/test_pwa_server.sh
./scripts/test_pwa_server.sh
- name: Install dependencies
run: npm ci
- name: Unit tests (Linux)
run: npm run test-unit-browsers
tests-unit-windows:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
runs-on: windows-latest
steps:
# Clone the repo and checkout the commit for which the workflow was triggered
- uses: actions/checkout@v3
- name: Install dependencies
run: npm ci
- name: Unit tests (Windows)
shell: pwsh
run: |
npm run test-unit-edge
npm run test-unit-firefox
# tests-unit-mac:
# if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
# runs-on: macos-latest
# steps:
# # Clone the repo and checkout the commit for which the workflow was triggered
# - uses: actions/checkout@v3
# - name: Install dependencies
# run: npm ci
# - name: Unit tests (Mackintosh)
# run: |
# npx testcafe remote ./tests/initTestCafe.js --hostname localhost --ports 1337,1338 &
# pid=$!
# open -a Safari http://localhost:1337
# wait $pid