Skip to content

Commit 53a3421

Browse files
committed
fixup! fixup! Drop travis.yml, add .github/workflows
1 parent c2a02e8 commit 53a3421

2 files changed

Lines changed: 59 additions & 25 deletions

File tree

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Test and publish package
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
13+
14+
steps:
15+
- uses: actions/checkout@v6
16+
- name: Set up Python ${{ matrix.python-version }}
17+
uses: actions/setup-python@v6
18+
with:
19+
python-version: ${{ matrix.python-version }}
20+
- name: Install some dependencies for testing
21+
run: python3 -m pip install flake8 flake8-bugbear flake8-import-order flake8-simplify flake8-bandit
22+
- name: Install this plugin with pip, too
23+
run: python3 -m pip install .
24+
- name: Run tests
25+
run: python3 -m unittest discover -s ./tests -v
26+
27+
build:
28+
name: Build a distribution package
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v6
32+
with:
33+
persist-credentials: false
34+
- name: Set up Python
35+
uses: actions/setup-python@v6
36+
with:
37+
python-version: "3.x"
38+
- name: Install pypa/build
39+
run: python3 -m pip install build --user
40+
- name: Build a binary wheel and a source tarball
41+
run: python3 -m build
42+
- name: Store the distribution packages
43+
uses: actions/upload-artifact@v5
44+
with:
45+
name: python-package-distributions
46+
path: dist/
47+
48+
publish-to-pypi:
49+
name: Publish to PyPI
50+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
51+
needs:
52+
- build
53+
- test
54+
runs-on: ubuntu-latest
55+
environment:
56+
name: pypi
57+
url: https://pypi.org/p/flake8-gl-codeclimate
58+
permissions:
59+
id-token: write # IMPORTANT: mandatory for trusted publishing

.github/workflows/test.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)