From c8835698199f95e6157ffa3d3ff48cf5ef8ac5a7 Mon Sep 17 00:00:00 2001 From: Fergus Cooper Date: Mon, 1 Jan 2024 21:01:09 +0000 Subject: [PATCH] First run at github workflows --- .github/workflows/test-os.yml | 36 +++++++++++++++++++++++++++++++ .github/workflows/test-python.yml | 36 +++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/test-os.yml create mode 100644 .github/workflows/test-python.yml diff --git a/.github/workflows/test-os.yml b/.github/workflows/test-os.yml new file mode 100644 index 0000000..90968f4 --- /dev/null +++ b/.github/workflows/test-os.yml @@ -0,0 +1,36 @@ +name: "Test: Windows, macOS, Linux" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + run-tests: + + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ["windows-latest", "macos-latest", "ubuntu-latest"] + + steps: + + - uses: actions/checkout@v3 + + - name: Set up Python 3.11 + uses: actions/setup-python@v3 + with: + python-version: "3.11" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install poetry + poetry install + + - name: Test with pytest + run: | + poetry run pytest \ No newline at end of file diff --git a/.github/workflows/test-python.yml b/.github/workflows/test-python.yml new file mode 100644 index 0000000..cea37d6 --- /dev/null +++ b/.github/workflows/test-python.yml @@ -0,0 +1,36 @@ +name: "Test: Py 3.9-3.11" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + workflow_dispatch: + +jobs: + run-tests: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + + steps: + + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install poetry + poetry install + + - name: Test with pytest + run: | + poetry run pytest