Skip to content

Commit

Permalink
Added workflow files for release
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick-kidger committed Oct 10, 2023
1 parent 3e81011 commit 9bf664b
Show file tree
Hide file tree
Showing 5 changed files with 64 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: [patrick-kidger]
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Release
uses: patrick-kidger/action_update_python_project@v2
with:
python-version: "3.11"
test-script: |
cp -r ${{ github.workspace }}/tests ./tests
cp ${{ github.workspace }}/pyproject.toml ./pyproject.toml
python -m pip install -r ./tests/requirements.txt
pytest
pypi-token: ${{ secrets.pypi_token }}
github-user: patrick-kidger
github-token: ${{ github.token }}
email-user: ${{ secrets.email_user }}
email-token: ${{ secrets.email_token }}
email-server: ${{ secrets.email_server }}
email-target: ${{ secrets.email_target }}
34 changes: 34 additions & 0 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run tests

on:
pull_request:

jobs:
run-test:
strategy:
matrix:
python-version: [ 3.9, 3.11 ]
os: [ ubuntu-latest ]
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r ./tests/requirements.txt
- name: Checks with pre-commit
uses: pre-commit/[email protected]

- name: Test with pytest
run: |
python -m pip install .
python -m pytest
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
[project]
name = "quax"
version = "0.0.1"
description = "Multiple dispatch via nonstandard interpretation, in JAX."
description = "Multiple dispatch in JAX via custom interpreters."
readme = "README.md"
requires-python ="~=3.9"
license = {file = "LICENSE"}
authors = [
{name = "Patrick Kidger", email = "[email protected]"},
# TODO: add others if they get involved
]
keywords = ["jax", "multiple-dispatch", "equinox"]
classifiers = [
Expand Down
1 change: 1 addition & 0 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
beartype

0 comments on commit 9bf664b

Please sign in to comment.