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
|
||||
|
||||
on:
|
||||
push:
|
||||
push: # Only run on merges into master that modify files under pyscriptjs/
|
||||
branches: main
|
||||
pull_request:
|
||||
branches: '*'
|
||||
paths:
|
||||
- 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:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest # Will be self hosted soon
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./pyscriptjs
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -30,9 +40,7 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd pyscriptjs
|
||||
npm install
|
||||
- name: Build pyscript
|
||||
run: |
|
||||
cd pyscriptjs
|
||||
npm run build
|
||||
|
||||
15
.github/workflows/lint.yml
vendored
15
.github/workflows/lint.yml
vendored
@@ -1,14 +1,19 @@
|
||||
name: Lint
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: main
|
||||
pull_request:
|
||||
branches: '*'
|
||||
|
||||
push: # Only run on merges into master that modify files under pyscriptjs/
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request: # Run on any PR that modifies files in pyscriptjs/
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./pyscriptjs
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
@@ -30,9 +35,7 @@ jobs:
|
||||
${{ runner.os }}-
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
cd pyscriptjs
|
||||
npm install
|
||||
- name: Run linter
|
||||
run: |
|
||||
cd pyscriptjs
|
||||
npm run lint
|
||||
|
||||
Reference in New Issue
Block a user