Skip to content

Modernize

Modernize #198

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '**'
pull_request: {}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install -r requirements/linting.txt
- uses: pre-commit/action@v3.0.0
with:
extra_args: --all-files
env:
SKIP: no-commit-to-branch
test:
name: test py${{ matrix.python-version }} on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu, windows, macos]
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.os }}-latest
env:
PYTHON: ${{ matrix.python-version }}
OS: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- run: pip install -r requirements/tests.txt
- run: pip install .
- run: pip freeze
- name: test
run: make test
env:
TEST_AWS_ACCESS_KEY: ${{ secrets.TEST_AWS_ACCESS_KEY }}
TEST_AWS_SECRET_KEY: ${{ secrets.TEST_AWS_SECRET_KEY }}
- run: coverage xml
- uses: codecov/codecov-action@v3
with:
file: ./coverage.xml
env_vars: PYTHON,OS
check: # This job does nothing and is only used for the branch protection
if: always()
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
id: all-green
with:
jobs: ${{ toJSON(needs) }}
release:
needs: [check]
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: set up python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: install
run: pip install -U build
- name: check version
id: check-version
uses: samuelcolvin/check-python-version@v3.2
with:
version_file_path: 'aioaws/version.py'
- name: build
run: python -m build
- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1