Skip to content

Commit

Permalink
update gh actions
Browse files Browse the repository at this point in the history
  • Loading branch information
drkane committed Sep 13, 2023
1 parent c9c1862 commit e9ccb1f
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 29 deletions.
43 changes: 18 additions & 25 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,51 +8,44 @@ jobs:
test:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
name: Configure pip caching
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-pip-
cache: pip
- name: Install dependencies
run: |
pip install -e '.[test]'
pip install -e .
pip install hatch
- name: Run tests
run: |
pytest
hatch run test
deploy:
runs-on: ubuntu-latest
needs: [test]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/cache@v2
name: Configure pip caching
uses: actions/setup-python@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-publish-pip-${{ hashFiles('**/setup.py') }}
restore-keys: |
${{ runner.os }}-publish-pip-
python-version: '3.10'
cache: pip
- name: Install dependencies
run: |
pip install setuptools wheel twine
pip install -e .
pip install hatch
- name: Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
hatch build
hatch publish
6 changes: 2 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Install dependencies
run: |
pip install -e .
Expand All @@ -38,8 +38,6 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Checkout submodules
uses: textbook/git-checkout-submodule-action@master
- name: Install dependencies
run: |
pip install -e .
Expand Down

0 comments on commit e9ccb1f

Please sign in to comment.