Merge branch 'feature/flush-logs' into testing #56
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: CI | |
on: [push] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
env: | |
FLAKE8: venv/bin/flake8 | |
MYPY: venv/bin/mypy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: 3.8 | |
- name: Set up virtualenv | |
run: python -m venv venv | |
- name: Install dependencies | |
run: | | |
venv/bin/pip install -r script/linting/requirements.txt | |
venv/bin/pip install -r script/typing/requirements.txt | |
- name: Linting | |
run: script/linting/lint | |
- name: Type checking | |
run: script/typing/check | |
build: | |
permissions: | |
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing | |
runs-on: ubuntu-latest | |
needs: lint | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip build | |
# Install package to generate version info | |
python -m pip install . | |
- name: Build package | |
run: | | |
python -m build | |
- name: Save built package | |
uses: actions/upload-artifact@v3 | |
with: | |
name: package | |
path: | | |
dist | |
- name: Publish to PyPi | |
if: ${{ github.ref_type == 'tag' }} | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
print_hash: true |