Skip to content

removed fs as its already met from other dependency #3

removed fs as its already met from other dependency

removed fs as its already met from other dependency #3

Workflow file for this run

name: Lint and Test
on:
push:
branches-ignore: ['main']
jobs:
repo_ids:
runs-on: ubuntu-latest
outputs:
repo_name: ${{ steps.repo_ids.outputs.REPO_NAME }}
org_name: ${{ steps.repo_ids.outputs.ORG_NAME }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get repository identifiers
id: repo_ids
run: |
REPO_NAME=$(echo "${{ github.event.repository.name }}" | tr '[:upper:]' '[:lower:]')
ORG_NAME=$(echo "${{ github.event.repository.owner.name }}" | tr '[:upper:]' '[:lower:]')
echo "REPO_NAME=$REPO_NAME" >> $GITHUB_OUTPUT
echo "ORG_NAME=$ORG_NAME" >> $GITHUB_OUTPUT
static-checks:
name: Run Static Analysis Checks
strategy:
fail-fast: false
matrix:
command: [lint, depcheck]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install Packages
run: npm ci
- name: Lint
run: npm run ${{ matrix.command }}
tests:
name: Run tests
strategy:
fail-fast: false
matrix:
command: ['test']
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Cache Node.js modules
uses: actions/cache@v4
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install Packages
run: npm ci
- name: Build
run: npm run build
- name: Run tests
run: npm run ${{ matrix.command }}
check-version:
name: 'Check version'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check version
id: get_version
uses: digicatapult/check-version@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}