chore: refactor CI #2
Workflow file for this run
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: Linting and Scanning | |
on: | |
push: | |
branches: | |
- "**" | |
tags-ignore: | |
- v* | |
jobs: | |
setup: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
lint: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Install dependencies | |
run: | | |
yarn | |
- name: Run lint | |
run: | | |
yarn lint | |
tests: | |
runs-on: ubuntu-latest | |
needs: setup | |
steps: | |
- name: Install dependencies | |
run: yarn | |
- name: Run tests | |
run: yarn test | |
codeql: | |
runs-on: ubuntu-latest | |
needs: setup | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'javascript' ] | |
steps: | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 |