synapse-s3-storage-provider/.github/workflows/ci.yml
David Robertson fa27fa1a92
Fix CI again (#90)
* Fix CI again

* Try invoking isort etc directly

* Don't bother nuking pyc files

* Remove usedevelop and commented-out 'find' invocation
2023-01-09 18:11:45 +00:00

81 lines
1.9 KiB
YAML

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
lint:
name: "Lint & Packaging"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: "actions/setup-python@v4"
with:
python-version: "3.x"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: "Run tox lint targets for ${{ matrix.python-version }}"
run: "python -m tox -e check_isort,pep8,packaging"
build:
# This is similar to the job in `release.yml`, but it does NOT upload to PyPI.
# We include it here to reduce the likelihood of someone publishing a release
# which doesn't build.
name: "Build and check Python package"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "3.x"
- name: "Install packaging tools"
run: "python -m pip install --upgrade build twine"
- name: "Build dist package"
run: "python -m build"
- name: "Run twine checks"
run: "python -m twine check dist/*"
tests:
needs: lint
name: "Python ${{ matrix.python-version }}"
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies"
run: |
set -xe
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade tox
- name: "Run tox targets for ${{ matrix.python-version }}"
run: "python -m tox -e py"