Skip to content

Commit

Permalink
Merge branch 'main' into pathlib-virtual-subclasses
Browse files Browse the repository at this point in the history
  • Loading branch information
barneygale committed Jan 4, 2024
2 parents 15bcbee + c4623c7 commit e3481e1
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Build

on:
push:

permissions:
contents: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2

publish:
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/')
environment:
name: release
url: https://pypi.org/project/pathlib-abc
steps:
- uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- name: Upload wheel to release
uses: svenstaro/upload-release-action@v2
with:
file: dist/*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
32 changes: 32 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
tests:
runs-on: ubuntu-latest
env:
FORCE_COLOR: "1"
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13" ]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
cache: pip
- run: python -Im pip install tox
- run: |
python -Im tox run \
-f py$(echo ${{ matrix.python-version }} | tr -d .)
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[tox]
isolated_build = True
envlist = py38,py39,py310,py311,py312,sphinx
envlist = py{38,39,310,311,312,313},sphinx

[testenv]
pass_env =
FORCE_COLOR
NO_COLOR
deps = pytest
commands = pytest tests

Expand Down

0 comments on commit e3481e1

Please sign in to comment.