Skip to content

Commit

Permalink
Merge branch 'master' into add-ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
imenelydiaker committed Jun 23, 2024
2 parents 67ffd93 + 28575d8 commit 2505b42
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 61 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [master]
pull_request:

defaults:
run:
shell: bash

jobs:
tests:
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Set up virtualenv
run: |
poetry config virtualenvs.in-project true
- uses: actions/cache@v3
name: Cache
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install --with dev
- name: Run tests
run: |
make tests
60 changes: 0 additions & 60 deletions .github/workflows/github-actions.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release

on:
release:

defaults:
run:
shell: bash

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install poetry
uses: abatilo/actions-poetry@v2
- name: Set up virtualenv
run: |
poetry config virtualenvs.in-project true
- uses: actions/cache@v3
name: Cache
with:
path: ./.venv
key: venv-${{ hashFiles('poetry.lock') }}
- name: Install the project dependencies
run: poetry install
- name: Build
run: poetry build
- name: Publish
run: |
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
poetry publish
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ install:
.PHONY: tests
tests:
@echo "--- 🧪 Running tests ---"
pytest tests/
poetry run pytest

.PHONY: lint
lint:
Expand Down

0 comments on commit 2505b42

Please sign in to comment.