Skip to content

fixup! fixup! Drop travis.yml, add .github/workflows #1

fixup! fixup! Drop travis.yml, add .github/workflows

fixup! fixup! Drop travis.yml, add .github/workflows #1

name: Test and publish package

Check failure on line 1 in .github/workflows/publish-to-pypi.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-to-pypi.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: publish-to-pypi
on:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install some dependencies for testing
run: python3 -m pip install flake8 flake8-bugbear flake8-import-order flake8-simplify flake8-bandit
- name: Install this plugin with pip, too
run: python3 -m pip install .
- name: Run tests
run: python3 -m unittest discover -s ./tests -v
build:
name: Build a distribution package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v5
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish to PyPI
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
needs:
- build
- test
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/flake8-gl-codeclimate
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing