Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,7 @@ jobs:
author_name: github-actions[bot]
author_email: github-actions[bot]@github.com
message: Automatic commit via GitHub Actions

- name: Test
if: ${{ steps.commit.outputs.committed == 'false' }}
run: poetry run test_common
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Test

on:
workflow_dispatch:

jobs:
test:
runs-on:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13'

- name: Install poetry
run: python -m pip install poetry==2.1.1

- name: Configure poetry
run: poetry config virtualenvs.in-project true

- name: Cache the virtualenv
uses: actions/cache@v4
with:
path: ./.venv
key: ${{ runner.os }}-venv-${{ hashFiles('**/poetry.lock') }}

- name: Install dependencies
run: poetry install

- name: Run format
run: poetry run test
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ all = "scripts:run_all"
format = "scripts:run_format"
lint = "scripts:run_lint"
test = "scripts:run_tests"
test_common = "scripts:run_tests_common"

[tool.poetry.dependencies]
numpy = "^2.2.4"
Expand Down
4 changes: 4 additions & 0 deletions scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ def run_format():

def run_tests():
run_cmd("poetry run pytest project_euler")


def run_tests_common():
run_cmd("poetry run pytest project_euler/common")