mass update & convert to use poetry (#16) #5
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: default | |
on: | |
pull_request: # any pull request | |
push: | |
branches: | |
- master | |
defaults: | |
run: | |
shell: bash | |
env: | |
NODE_VERSION: '20' | |
PYTEST_ADDOPTS: --color=yes | |
jobs: | |
pre-commit: | |
name: pre-commit | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ITProKyle/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- run: make run-pre-commit | |
lint-python: | |
name: Lint Python | |
strategy: | |
matrix: | |
python-version: [3.9, '3.10', 3.11] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Install Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
- uses: ITProKyle/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Node Dependencies | |
run: npm ci | |
- name: Run Linters | |
run: make lint | |
test-python: | |
name: Python tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9, '3.10', 3.11] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ITProKyle/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run tests | |
run: make test | |
build-pypi: | |
name: Build PyPi 📦 | |
needs: | |
- pre-commit | |
- lint-python | |
- test-python | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.11] | |
steps: | |
- name: Checkout Repo (complete) | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: ITProKyle/[email protected] | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Run Build | |
run: make build | |
- name: Upload Distribution Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: pypi-dist | |
path: dist |