Improve UX #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |