Feature/tts 470 #1044
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: Run Tests | |
# yamllint disable-line rule:truthy | |
on: | |
pull_request: | |
permissions: read-all | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: "Run tests" | |
permissions: write-all | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # pin@v3 | |
- name: Read .nvmrc | |
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)" | |
id: nvm | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # pin@v3 | |
with: | |
node-version: "${{ steps.nvm.outputs.NVMRC }}" | |
- name: Install NPM dependencies | |
run: npm ci | |
- name: Validate job postings | |
run: | | |
# Install AJV CLI | |
npm install -g ajv-cli | |
# Validate job posting files | |
ajv validate -s schemas/job-posting-schema.json -d jobs/*.md | |
- name: Build site | |
run: npm run build | |
- name: report code coverage | |
uses: ArtiomTr/jest-coverage-report-action@262a7bb0b20c4d1d6b6b026af0f008f78da72788 # pin@v2.3.1 | |
with: | |
skip-step: install | |
annotations: none | |
coverage-file: ./report.json | |
github-token: ${{ secrets.PAT || secrets.GITHUB_TOKEN || github.token }} |