Skip to content

Commit

Permalink
Update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Nov 24, 2023
1 parent b69986f commit f3145c7
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 29 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,21 @@ on:
name: Create Release

jobs:
build_on_macos:
name: Build macOS wheels
runs-on: macos-latest
build:
name: Build wheels
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.10']
python-version: ['3.12']

permissions:
contents: write
id-token: write

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create release
uses: softprops/action-gh-release@v1
Expand All @@ -30,7 +34,7 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools wheel twine build
python -m pip install --upgrade pip setuptools wheel build
- name: Build wheels
run: |
Expand All @@ -40,9 +44,5 @@ jobs:
run: |
pyproject-build -s
- name: Publish wheels to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
run: |
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
29 changes: 12 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,39 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v3

- name: Cache Setup
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel setuptools
poetry install
pip install --upgrade wheel pip setuptools
pip install .
- name: Lint with ruff
run: |
poetry run ruff .
pip install ruff
ruff check archon/ tests/
- name: Lint with black
run: |
poetry run black --check .
pip install black
black --check archon/ tests/
- name: Test with pytest
run: |
poetry run pytest
pip install pytest pytest-mock pytest-asyncio pytest-cov
pytest
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml

0 comments on commit f3145c7

Please sign in to comment.