Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split workflows on push and pull request
This patch duplicates the workflows so that they do not run in double for no reason. This saves some CO2 in the atmosphere.
- Loading branch information
Showing
6 changed files
with
107 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Continuous Integration on Pull Request - OSX | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip3 install .[dev] | ||
- name: Check | ||
run: | | ||
python precommit.py |
7 changes: 6 additions & 1 deletion
7
.github/workflows/ci_with_osx.yml → ...workflows/ci_with_osx_on_push_to_main.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
name: Continuous Integration - OSX | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- main | ||
|
||
|
||
jobs: | ||
tests: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Continuous Integration on Pull Request - Ubuntu | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
Execute: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install Dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
pip3 install --upgrade coveralls | ||
pip3 install .[dev] | ||
- name: Check | ||
run: | | ||
python precommit.py | ||
- name: Upload Coverage | ||
run: coveralls --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} | ||
COVERALLS_PARALLEL: true | ||
|
||
Finish-Coveralls: | ||
name: Finish Coveralls | ||
needs: Execute | ||
runs-on: ubuntu-latest | ||
container: python:3-slim | ||
steps: | ||
- name: Finish Coveralls | ||
run: | | ||
pip3 install --upgrade coveralls | ||
coveralls --finish --service=github | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
6 changes: 5 additions & 1 deletion
6
.github/workflows/ci_with_ubuntu.yml → ...kflows/ci_with_ubuntu_on_push_to_main.yml
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Continuous Integration on Pull Request - Windows | ||
|
||
on: [pull_request] | ||
|
||
jobs: | ||
tests: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python 3.x | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: 3.x | ||
|
||
- name: Install Dependencies | ||
run: | | ||
pip3 install .[dev] | ||
- name: Check | ||
run: | | ||
python precommit.py |
6 changes: 5 additions & 1 deletion
6
.github/workflows/ci_with_windows.yml → ...flows/ci_with_windows_on_push_to_main.yml
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