Skip to content

Commit

Permalink
Reduce ci load (#123)
Browse files Browse the repository at this point in the history
* fix syntax

* fix syntax and run only on PRs and main

* run only on PRs and main

* run only on PRs and main

* reduce CI load
  • Loading branch information
ocefpaf authored Nov 9, 2022
1 parent 8c18ad6 commit 7188ab5
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 13 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: Build and Deploy docs

name: Documentation

on:
pull_request:

push:
tags:
- "v*"
branches:
- main
release:
types:
- published

jobs:
build-docs:
Expand Down Expand Up @@ -43,7 +46,7 @@ jobs:
popd
- name: Deploy
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
if: success() && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@

name: Publish to PyPI

on: ["push", "pull_request"]
on:
pull_request:
push:
branches:
- main
release:
types:
- published

defaults:
run:
Expand Down Expand Up @@ -38,8 +46,8 @@ jobs:
python -m twine check *
- name: Publish a Python distribution to PyPI
if: ${{ github.event_name == 'release' }}
uses: pypa/gh-action-pypi-publish@v1.5.1
if: success() && github.event_name == 'release'
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_PASSWORD }}
19 changes: 16 additions & 3 deletions .github/workflows/test_code.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
name: Code Tests

on: ["push", "pull_request"]
on:
pull_request:
push:
branches: [main]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
python-version: ["3.11"]
# We only run latest Python on macOS and Windows to save resources.
include:
- os: ubuntu-latest
python-version: "3.7"
- os: ubuntu-latest
python-version: "3.8"
- os: ubuntu-latest
python-version: "3.9"
- os: ubuntu-latest
python-version: "3.10"

steps:
- uses: actions/checkout@v3
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_code_notebooks.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Notebook Tests

on: ["push", "pull_request"]
on:
pull_request:
push:
branches: [main]

jobs:
run:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/test_selenium.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Headless Tests

on: ["push", "pull_request"]
on:
pull_request:
push:
branches: [main]

jobs:
run:
Expand Down

0 comments on commit 7188ab5

Please sign in to comment.