chore(deps): update actions/cache action to v4 #229
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: scip-snapshots | |
on: | |
push: | |
branches: | |
- scip | |
pull_request: | |
branches: | |
- scip | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install asdf. | |
uses: asdf-vm/actions/[email protected] | |
- name: Cache asdf and asdf-managed tools. | |
uses: actions/[email protected] | |
id: asdf-cache | |
with: | |
path: ${{ env.ASDF_DIR }} | |
key: asdf-${{ runner.os}}-${{ hashFiles('**/.tool-versions') }} | |
- name: Install asdf tools (if not cached). | |
if: steps.asdf-cache.outputs.cache-hit != 'true' | |
uses: asdf-vm/actions/[email protected] | |
- name: Get npm cache directory | |
id: npm-cache | |
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT | |
- uses: actions/cache@v4 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: 'Check package-lock.json up-to-date' | |
run: | | |
CMD="cd ./packages/pyright-scip && npm install --package-lock-only --ignore-scripts" | |
bash -c "$CMD" | |
if ! git diff --quiet; then | |
git diff | |
echo "" | |
echo "----------------------------------------------------------------------------------------------" | |
echo "Re-run $CMD and push" | |
echo "----------------------------------------------------------------------------------------------" | |
exit 1 | |
fi | |
- run: npm install | |
- run: cd ./packages/pyright-scip/ && npm install && npm run build | |
- run: python --version | |
- run: cd ./packages/pyright-scip/ && npm run check-snapshots |