Skip to content

Commit

Permalink
Run CI only on PRs ready for review (#533)
Browse files Browse the repository at this point in the history
* Run CI only on PRs ready for review
* Run linting on every commit
* Run build for ubuntu/3.10 for draft, all for ready for review
  • Loading branch information
stefsmeets authored Mar 28, 2023
1 parent 341f6dd commit c755932
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 6 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,23 @@ on:
- ready_for_review

jobs:
build_single:
name: Build
if: github.event.pull_request.draft == true
runs-on: 'ubuntu-latest'
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
with:
python-version: '3.10'
- name: Run unit tests
run: pytest -v
- name: Verify that we can build the package
run: python3 setup.py sdist bdist_wheel

build:
build_all:
name: Build for (${{ matrix.python-version }}, ${{ matrix.os }})
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ jobs:

build:
name: Build documentation
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-python-and-package
- name: Install pandoc using apt
run: sudo apt install pandoc
run: sudo apt install pandoc
- name: Build documentation
run: make coverage doctest html
working-directory: docs
7 changes: 4 additions & 3 deletions .github/workflows/fair-software.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,18 @@ jobs:
- uses: fair-software/[email protected]
name: Measure compliance with fair-software.eu recommendations
env:
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
with:
MY_REPO_URL: "https://github.com/${{ github.repository }}"

verify_pull_request:
name: "fair-software"
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
if: ${{ (github.event_name == 'pull_request') and (github.event.pull_request.draft == false) }}
steps:
- uses: fair-software/[email protected]
name: Measure compliance with fair-software.eu recommendations
env:
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
PYCHARM_HOSTED: "Trick colorama into displaying colored output"
with:
MY_REPO_URL: "https://github.com/${{ github.repository }}/refs/remotes/pull/${{ github.event.pull_request.number }}/merge"
1 change: 1 addition & 0 deletions .github/workflows/markdown-link-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:

markdown-link-check:
name: Check markdown links
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@ on:

jobs:

notebooks:
notebooks:
name: Run notebooks on (3.9, ${{ matrix.os }})
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:

sonarcloud:
name: SonarCloud
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down

0 comments on commit c755932

Please sign in to comment.