Merge pull request #1685 from informalsystems/release/0.25.1 #203
This file contains hidden or 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: Lint VSCode Extension | |
on: | |
# Every pull request | |
pull_request: | |
# When part of a merge queue | |
# See https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/managing-a-merge-queue#triggering-merge-group-checks-with-github-actions | |
merge_group: | |
# Pushes into the trunk | |
# This is important to ensure the trunk is not broken and | |
# to populate the cache for future PRs. | |
# See https://github.community/t/actions-cache-cache-not-being-hit-despite-of-being-present/17956/3 | |
push: | |
branches: | |
- main | |
jobs: | |
changes: | |
name: Detect changes | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: read | |
outputs: | |
vscode: ${{ steps.filter.outputs.vscode }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: | | |
vscode: | |
- 'vscode/**' | |
format-check: | |
needs: changes | |
if: ${{ needs.changes.outputs.vscode == 'true' || github.ref == 'refs/heads/main' }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: "18" | |
- name: Install quint deps | |
run: cd ./quint && npm install | |
- name: Install yalc | |
run: npm i yalc -g | |
- name: Compile quint vscode plugin | |
run: make local | |
- name: Run formatting for the plugin | |
run: cd ./vscode/quint-vscode && npm run format-check || (echo "Run 'npm run format'" && exit 1) |