diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml new file mode 100644 index 0000000..e8b67e2 --- /dev/null +++ b/.github/workflows/build_test.yaml @@ -0,0 +1,29 @@ +name: build-test + +on: [push, pull_request, workflow_dispatch] + +jobs: + build_and_test: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.9', '3.10'] + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install Poetry + run: pip install poetry + - name: Configure Poetry + run: poetry config virtualenvs.in-project true + - name: Lock dependencies + run: poetry lock + - name: Build package + run: poetry build + - name: Install dependencies + run: poetry install --with dev + - name: Run tests + run: poetry run pytest