mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 18:27:29 -05:00
CI Improvements; more focused runs and best practices (#236)
* add path filtering * small improvements for clarity, more focused run triggers, best practices * formatting * add js linting to pre-commit * Update .pre-commit-config.yaml * Update .pre-commit-config.yaml
This commit is contained in:
20
.github/workflows/build.yml
vendored
20
.github/workflows/build.yml
vendored
@@ -1,14 +1,24 @@
|
|||||||
name: Build
|
name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push: # Only run on merges into master that modify files under pyscriptjs/
|
||||||
branches: main
|
branches: main
|
||||||
pull_request:
|
paths:
|
||||||
branches: '*'
|
- pyscriptjs/**
|
||||||
|
- .github/workflows/** # Test that workflows work when changed
|
||||||
|
|
||||||
|
pull_request: # Run on any PR that modifies files in pyscriptjs/
|
||||||
|
paths:
|
||||||
|
- pyscriptjs/**
|
||||||
|
- .github/workflows/**
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest # Will be self hosted soon
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./pyscriptjs
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -30,9 +40,7 @@ jobs:
|
|||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd pyscriptjs
|
|
||||||
npm install
|
npm install
|
||||||
- name: Build pyscript
|
- name: Build pyscript
|
||||||
run: |
|
run: |
|
||||||
cd pyscriptjs
|
|
||||||
npm run build
|
npm run build
|
||||||
|
|||||||
15
.github/workflows/lint.yml
vendored
15
.github/workflows/lint.yml
vendored
@@ -1,14 +1,19 @@
|
|||||||
name: Lint
|
name: Lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches: main
|
push: # Only run on merges into master that modify files under pyscriptjs/
|
||||||
pull_request:
|
branches:
|
||||||
branches: '*'
|
- main
|
||||||
|
|
||||||
|
pull_request: # Run on any PR that modifies files in pyscriptjs/
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
working-directory: ./pyscriptjs
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@@ -30,9 +35,7 @@ jobs:
|
|||||||
${{ runner.os }}-
|
${{ runner.os }}-
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
cd pyscriptjs
|
|
||||||
npm install
|
npm install
|
||||||
- name: Run linter
|
- name: Run linter
|
||||||
run: |
|
run: |
|
||||||
cd pyscriptjs
|
|
||||||
npm run lint
|
npm run lint
|
||||||
|
|||||||
Reference in New Issue
Block a user