Test #7
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: Test | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# run when build has done | |
workflow_run: | |
workflows: [Build] | |
types: | |
- completed | |
concurrency: | |
group: test | |
cancel-in-progress: true | |
jobs: | |
Check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: 'Checkout' | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
with: | |
submodules: recursive | |
- name: 'Download build artifacts' | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: build-artifact | |
run_id: ${{ github.event.workflow_run.id }} | |
workflow_conclusion: success | |
- name: 'Setup Nodejs' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: 'Install dependencies' | |
run: npm ci | |
- name: 'Produce Reports & Logs' | |
if: always() | |
run: npm run ci:check | |
- name: 'Logscan TypeCheck Src' | |
if: always() | |
id: logscan_src | |
run: '.github/logscan.sh reports/typecheck.log' | |
- name: 'TypeCheck Src' | |
if: always() | |
uses: LouisBrunner/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Typecheck Src | |
conclusion: ${{steps.logscan_src.conclusion}} | |
output: | | |
{"summary":"${{ steps.logscan_src.outputs.summary }}"} | |
- name: 'Logscan TypeCheck Examples' | |
if: always() | |
id: logscan_examples | |
run: '.github/logscan.sh reports/typecheck-examples.log' | |
- name: 'TypeCheck Examples' | |
if: always() | |
uses: LouisBrunner/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Typecheck Examples | |
conclusion: ${{steps.logscan_examples.conclusion}} | |
output: | | |
{"summary":"${{ steps.logscan_examples.outputs.summary }}"} | |
- name: 'Logscan TypeCheck Tests' | |
if: always() | |
id: logscan_tests | |
run: '.github/logscan.sh reports/typecheck-tests.log' | |
- name: 'TypeCheck Tests' | |
if: always() | |
uses: LouisBrunner/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
name: Typecheck Tests | |
conclusion: ${{steps.logscan_tests.conclusion}} | |
output: | | |
{"summary":"${{ steps.logscan_tests.outputs.summary }}"} | |
- name: 'Report Src Code Linting Results' | |
if: always() | |
uses: ldiego73/[email protected] | |
with: | |
report: "reports/eslint-src.json" | |
title: 'Eslint Src' | |
- name: 'Report Examples Code Linting Results' | |
if: always() | |
uses: ldiego73/[email protected] | |
with: | |
report: "reports/eslint-examples.json" | |
title: 'Eslint Examples' | |
- name: 'Report Tests Code Linting Results' | |
if: always() | |
uses: ldiego73/[email protected] | |
with: | |
report: "reports/eslint-tests.json" | |
title: 'Eslint Tests' | |
- name: 'Upload Check artifacts' | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: check-artifact | |
if-no-files-found: error | |
path: | | |
reports/ | |
Test: | |
name: Test | |
runs-on: ubuntu-latest | |
# container: | |
# image: mcr.microsoft.com/playwright:v1.40.0-jammy | |
steps: | |
# - name: 'Initialize Git LFS' | |
# run: curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash | |
# - name: 'Install Git LFS' | |
# run: apt-get install -y git-lfs | |
- name: 'Checkout' | |
uses: nschloe/action-cached-lfs-checkout@v1 | |
with: | |
submodules: recursive | |
- name: 'Download build artifacts' | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: build-artifact | |
run_id: ${{ github.event.workflow_run.id }} | |
workflow_conclusion: success | |
- name: 'Setup Nodejs' | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: 'Install dependencies' | |
run: npm ci | |
- name: 'Run Playwright Tests' | |
run: sudo npm test # for some reason servez needs sudo in ci? | |
env: | |
HOME: /root | |
- name: 'Generate NYC Report' | |
if: always() | |
run: npm run test:report-coverage | |
- name: 'Report NYC coverage' | |
if: always() | |
uses: sidx1024/[email protected] | |
with: | |
# Path to coverage file generated by "nyc report". | |
coverage_file: "coverage/coverage-summary.json" | |
- name: 'Upload Test artifacts' | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-artifact | |
if-no-files-found: error | |
path: | | |
test-results/ | |
coverage/ | |
playwright-report/ | |
tests/__snapshots__/ | |
- name: 'Rebuild with no Coverage' | |
run: npm run build | |
- name: 'Upload Build artifacts' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: build-artifact | |
if-no-files-found: error | |
path: | | |
libultrahdr-wasm/build/*.ts | |
libultrahdr-wasm/build/*.js | |
libultrahdr-wasm/build/*.map | |
libultrahdr-wasm/build/*.wasm | |
dist/ |