This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
updates Node to something not ancient #4
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: VS Code Extension for SQL Extraction | |
on: | |
push: | |
paths: | |
- 'tools/vscode_sql_extraction/**' | |
- '.github/workflows/vscode-sql-extraction.yml' | |
pull_request: | |
paths: | |
- 'tools/vscode_sql_extraction/**' | |
- '.github/workflows/vscode-sql-extraction.yml' | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: tools/vscode_sql_extraction | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm install | |
- name: Run linter/checks | |
run: npm run check | |
test: | |
strategy: | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
working-directory: tools/vscode_sql_extraction | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 18.x | |
- name: Cache node modules | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
uses: GabrielBB/xvfb-action@v1.2 | |
with: | |
run: npm test |