mirror of
https://github.com/pyscript/pyscript.git
synced 2026-02-13 07:01:00 -05:00
75 lines
2.4 KiB
YAML
75 lines
2.4 KiB
YAML
name: "[CI] Test Next"
|
|
|
|
on:
|
|
push: # Only run on merges into main that modify files under pyscriptjs/ and examples/
|
|
branches:
|
|
- next
|
|
paths:
|
|
- pyscript.core/**
|
|
- .github/workflows/test-next.yml # Test that workflow works when changed
|
|
|
|
pull_request: # Run on any PR that modifies files under pyscriptjs/ and examples/
|
|
branches:
|
|
- next
|
|
paths:
|
|
- pyscript.core/**
|
|
- .github/workflows/test-next.yml # Test that workflow works when changed
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
TestNext:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: pyscript.core
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Install node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 20.x
|
|
|
|
- name: Cache node modules
|
|
uses: actions/cache@v3
|
|
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 }}-
|
|
|
|
# TODO: this will likely change soon to pyscript.next
|
|
# - name: install next deps
|
|
# working-directory: pyscript.core
|
|
# run: npm i; npx playwright install
|
|
|
|
# - name: build next
|
|
# working-directory: pyscript.core
|
|
# run: npm run build
|
|
|
|
# - name: Run next tests
|
|
# working-directory: pyscript.core
|
|
# run: npm run test
|
|
|
|
# TODO: DO we want to upload next yet?
|
|
# - uses: actions/upload-artifact@v3
|
|
# with:
|
|
# name: pyscript
|
|
# path: |
|
|
# pyscriptjs/build/
|
|
# if-no-files-found: error
|
|
# retention-days: 7
|
|
|
|
# - uses: actions/upload-artifact@v3
|
|
# if: success() || failure()
|
|
# with:
|
|
# name: test_results
|
|
# path: pyscriptjs/test_results
|
|
# if-no-files-found: error
|