Parrotfish for Step Function, Execution Time Constraint Optimization #55
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: Continuous Integration & Continuous Delivery Workflow | |
# This workflow is triggered whenever a new PR is created on the main branch | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'src/**' | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
paths: | |
- 'src/**' | |
jobs: | |
lint: | |
name: "Linting" | |
defaults: | |
run: | |
shell: bash | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "Install Dependencies" | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
- name: "Check Python formatting" | |
id: check-python | |
continue-on-error: true | |
run: black . --check | |
# Run unit tests to make sure everything is 👍 | |
test: | |
name: "Run unit tests" | |
defaults: | |
run: | |
shell: bash | |
needs: lint | |
# Specify the OS we want the workflow to run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ ubuntu-latest, windows-latest, macos-latest ] | |
python-version: [ '3.9', '3.10' ] | |
steps: | |
- name: "Checkout repository" | |
uses: actions/checkout@v3 | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{matrix.python-version}} | |
- name: "Install Dependencies" | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r requirements-dev.txt | |
- name: "Run Tests" | |
run: pytest -v --cov --disable-warnings | |
packaging: | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
id-token: write | |
needs: test | |
steps: | |
- name: "Checkout the repository" | |
uses: actions/checkout@v3 | |
- name: "Set up Python" | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: "Install dependencies" | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt -r requirements-dev.txt | |
- name: "Create packages" | |
run: | | |
export PACKAGE_VERSION=${{github.ref_name}} | |
python -m setup bdist_wheel sdist | |
- name: "Test if the package is installable" | |
run: | | |
pip install dist/*.whl | |
parrotfish -h | |
- name: "Create a Release" | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
dist/* | |
generate_release_notes: true |