-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Pin ubuntu 20.04 on actions and split jobs into separate files (#33)
* pin ubuntu 20.04 on actions * split GHA into individual jobs Co-authored-by: sseraj <sseraj@umich.edu>
- Loading branch information
Showing
8 changed files
with
123 additions
and
142 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,17 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
black_version: | ||
required: false | ||
type: string | ||
default: "22.3.0" | ||
|
||
jobs: | ||
black: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--check --diff -l 120 --target-version py38 --target-version py39" | ||
version: ${{ inputs.black_version }} |
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,13 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
clang_format: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install clang-format-10 -y | ||
- name: Run clang_format | ||
run: | | ||
bash ./.github/clang_format.sh |
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,34 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
flake8: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
matrix: | ||
python-version: [3.8, 3.9] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install wheel | ||
wget https://raw.githubusercontent.com/mdolab/.github/main/flake8-requirements.txt | ||
pip install -r flake8-requirements.txt | ||
- name: Lint with flake8 | ||
run: | | ||
if [[ -f ".flake8" ]]; then | ||
export FL8=.flake8-project | ||
mv .flake8 $FL8; # rename the file from code repo; should have higher precedence in merge | ||
fi | ||
wget https://raw.githubusercontent.com/mdolab/.github/main/.flake8; | ||
if [[ -f "$FL8" ]]; then | ||
flake8 . --append-config $FL8 --count --show-source --statistics; | ||
else | ||
flake8 . --count --show-source --statistics; | ||
fi |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
isort: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Get isort config file | ||
run: | | ||
# copy over the isort config file | ||
if [[ ! -f ".isort.cfg" ]]; then | ||
wget https://raw.githubusercontent.com/mdolab/.github/main/.isort.cfg | ||
fi | ||
- uses: isort/isort-action@master |
This file was deleted.
Oops, something went wrong.
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,19 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
mypy: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
pip install wheel | ||
pip install mypy | ||
- name: Mypy check | ||
run: | | ||
mypy --any-exprs-report mypy-output . | ||
cat mypy-output/any-exprs.txt |
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,21 @@ | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
pylint: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
- name: Install dependencies | ||
run: | | ||
pip install wheel | ||
pip install pylint | ||
- name: Run pylint | ||
run: | | ||
# copy over the pylint config file | ||
wget https://raw.githubusercontent.com/mdolab/.github/main/.pylintrc | ||
find . -type f -name "*.py" -not -path "*/doc/*" | xargs pylint |