Add an action for testing
Committed f60556
index 0000000..a2db433
--- /dev/null
+name: Run Tests
+
+on:
+ push:
+ branches:
+ - main
+ pull_request:
+ branches:
+ - main
+
+jobs:
+ build-linux:
+ strategy:
+ matrix:
+ python-version: ["3.10"]
+ runs-on: "ubuntu-latest"
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install Python
+ uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Remove development dependencies
+ run: sed -i '/\[tool.poetry.group.dev.dependencies\]/,/\[/d' pyproject.toml
+ - name: Install Poetry
+ uses: snok/install-poetry@v1
+ with:
+ version: 1.2.2
+ virtualenvs-in-project: true
+ - name: Install dependencies
+ run: poetry install --no-interaction --no-root --without=dev
+ - name: Install library
+ run: poetry install --no-interaction --without=dev
+ - name: Install development tools
+ run: poetry add gmpg
+ - name: Run tests
+ run: poetry run pytest --doctest-modules
+ - uses: psf/black@stable
+ with:
+ options: "--check --verbose"
+ src: "."
+ version: "23.7"
+ - uses: isort/isort-action@v1