Skip to content

Commit

Permalink
Updated GitHub Actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Nov 18, 2022
1 parent 395c499 commit 7e5ff85
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 16 deletions.
25 changes: 14 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@ on:
release:
types: [created]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
name: Configure pip caching
- name: Configure pip caching
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
Expand All @@ -33,12 +36,12 @@ jobs:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.9'
- uses: actions/cache@v2
python-version: "3.11"
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
Expand All @@ -47,11 +50,11 @@ jobs:
${{ runner.os }}-publish-pip-
- name: Install dependencies
run: |
pip install setuptools wheel twine
pip install setuptools wheel twine build
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
python -m build
twine upload dist/*
13 changes: 8 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,23 @@
name: Test

on: [push]
on: [push, pull_request]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
- uses: actions/cache@v3
name: Configure pip caching
with:
path: ~/.cache/pip
Expand Down

0 comments on commit 7e5ff85

Please sign in to comment.