Skip to content

chore: allow watching files (behind a flag) (#409) #713

chore: allow watching files (behind a flag) (#409)

chore: allow watching files (behind a flag) (#409) #713

Workflow file for this run

name: Node.js CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
FORCE_COLOR: 1
jobs:
test:
runs-on: ${{ matrix.os }}
name: Run tests on ${{ matrix.os }}, Node ${{ matrix.node-version }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
node-version: [ 20 ]
include:
- os: ubuntu-latest
node-version: 18
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npx playwright install chromium
- run: npm run lint
- run: npm run build
- run: npm run test -- --project=cli --project=cli-reuse --workers=1
- run: npx vsce package
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20'
- uses: actions/upload-artifact@v3
if: matrix.os == 'ubuntu-latest' && matrix.node-version == '20'
with:
name: vsc-extension
path: "*.vsix"
retention-days: 30
test-e2e:
runs-on: ${{ matrix.os }}
name: Run e2e tests
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
env:
DEBUG: pw:browser
steps:
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npx playwright install --with-deps chromium
- run: npm run build
- run: npm ci
working-directory: ./tests-integration
- run: xvfb-run npx playwright test
working-directory: ./tests-integration
if: matrix.os == 'ubuntu-latest'
- run: npx playwright test
working-directory: ./tests-integration
if: matrix.os != 'ubuntu-latest'
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.os }}
path: tests-integration/playwright-report/
retention-days: 30
- uses: actions/upload-artifact@v4
if: failure()
with:
name: playwright-test-results-${{ matrix.os }}
path: tests-integration/test-results/
retention-days: 10