-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 80f0a12
Showing
8 changed files
with
556 additions
and
0 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,91 @@ | ||
# Basic workflow | ||
name: build | ||
|
||
# Controls when the action will run | ||
# Workflow begins with push or PR events | ||
# Focuses on the master branch only | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
# Create one single job | ||
# This job performs all necessary checks | ||
jobs: | ||
build: | ||
# Use the latest version of Ubuntu on Microsoft Azure | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
# Performs all actions on different versions of Python | ||
python-version: ["3.10"] | ||
# Define the workflow steps | ||
steps: | ||
# Checkout the code of the repository | ||
- name: Check out Repository Code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
# Run the mdl linting tool | ||
# Refers to .mdlrc file in repository | ||
- name: Run Markdown Linting | ||
uses: actionshub/markdownlint@main | ||
# Setup Python for the current language version | ||
- name: Setup Python ${{ matrix.python-version }} | ||
if: always() | ||
uses: actions/setup-python@v1 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# Install pip | ||
- name: Install Pip | ||
if: always() | ||
run: | | ||
pip install -U pip | ||
# Install poetry | ||
- name: Install Poetry | ||
if: always() | ||
uses: abatilo/[email protected] | ||
with: | ||
poetry-version: 1.1.8 | ||
# Run the Python program | ||
- name: Run Python Program | ||
if: always() | ||
run: | | ||
cd rootfinder | ||
poetry install | ||
poetry run rootfinder | ||
poetry run rootfinder --a 1 --b 1 --c 1 | ||
poetry run rootfinder --a 1 --b 2 --c 1 | ||
# Run the black code formatter in checking mode | ||
- name: Run Black Code Formatter | ||
run: | | ||
cd rootfinder | ||
poetry run task black | ||
# Run the flake8 linting tool | ||
- name: Run Flake8 Linting Tool | ||
run: | | ||
cd rootfinder | ||
poetry run task flake8 | ||
# Run the pydocstyle linting tool | ||
- name: Run Pydocstyle Linting Tool | ||
run: | | ||
cd rootfinder | ||
poetry run task pydocstyle | ||
# Run the pylint linting tool | ||
- name: Run Pylint Linting Tool | ||
run: | | ||
cd rootfinder | ||
poetry run task pylint | ||
# Run the mypy type checking tool | ||
- name: Run Mypy Type Checking Tool | ||
run: | | ||
cd rootfinder | ||
poetry run task mypy | ||
# Run GatorGrader: see config/gatorgrade.yml | ||
- name: Run GatorGrader with GatorGrade | ||
if: always() | ||
run: | | ||
pip install gatorgrade | ||
gatorgrade --config config/gatorgrade.yml |
Oops, something went wrong.