CI #253
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: CI | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "3 4 * * 5" | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: npm install | |
- name: Lint files | |
run: npm run lint -- --formatter github | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: npm install | |
- name: Run unit tests | |
run: npm run test:unit | |
- name: Run integration tests | |
run: COUNTRY=us npm run test:integration | |
if: always() | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install dependencies | |
run: npm install | |
- name: Run mutation tests and send coverage | |
run: npm run test:coverage -- --reporters clear-text,dashboard | |
env: | |
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} | |
analyze: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: "javascript" | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |