Usig ESLint during lint-stage and workflow #40
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will install Deno then run `deno lint` and `deno test`. | |
# For more information see: https://github.com/denoland/setup-deno | |
name: Deno | |
on: | |
push: | |
branches: ['main'] | |
pull_request: | |
branches: ['main', '[0-9]+-[0-9]+-*'] | |
workflow_call: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: latest | |
- run: deno install | |
- run: deno fmt --check | |
- run: deno lint | |
- run: | | |
NPM_VERSION=$(cat package.json | yarn --silent json 'version') | |
JSR_VERSION=$(cat deno.json | yarn --silent json 'version') | |
if [[ "$NPM_VERSION" != "$JSR_VERSION" ]] | |
then | |
echo "Version mismatch between package.json ($NPM_VERSION) and deno.json ($JSR_VERSION)" | |
exit 1 | |
fi |