-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (48 loc) · 1.47 KB
/
automatedTesting.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
name: Automated Testing
on:
pull_request:
branches:
- main
workflow_dispatch:
permissions: read-all
jobs:
validate-json-data:
name: Validate JSON Data
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Validate JSON Data
run: |
npm install @actions/core ajv [email protected]
node tests/validateJsonData.js
test-sample-structures:
name: Test Sample Structures
needs: validate-json-data
runs-on: ubuntu-latest
strategy:
matrix:
browser: [Chrome, Firefox]
fail-fast: false
steps:
- name: Checkout repository
uses: actions/[email protected]
- name: Test Sample Structures on ${{ matrix.browser }}
run: |
npm install @actions/core puppeteer mime-types
if [[ "${{ matrix.browser }}" == "Firefox" ]]; then
npx puppeteer browsers install firefox
fi
node tests/testSampleStructures.js ${{ matrix.browser }}
- name: Upload completed packs as artifacts
if: always()
uses: actions/[email protected]
with:
name: completed_packs_${{ matrix.browser }}
path: tests/completedPacks
- name: Upload screenshots as artifacts
if: always() && matrix.browser == 'Chrome'
uses: actions/[email protected]
with:
name: screenshots_${{ matrix.browser }}
path: tests/screenshots