fix(ci): always mark draft PRs as not green #23
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
branches: [ main ] | |
types: [opened, synchronize, reopened, ready_for_review] | |
jobs: | |
fail-if-pull-request-is-draft: | |
if: github.event.pull_request.draft == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass. | |
run: exit 1 | |
test: | |
if: github.event.pull_request.draft == false | |
runs-on: ubuntu-latest | |
container: riedmiki/gromacs-plumed-python:2023.5-plumed | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: psf/black@stable | |
- name: run tox | |
run: tox | |
- name: zip coverage report | |
if: ${{ !cancelled() }} | |
run: zip -r htmlcov.zip htmlcov || true | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: coverage artifact | |
path: htmlcov.zip | |