diff --git a/.github/workflows/python-package-testing.yml b/.github/workflows/main-branch-testing.yml similarity index 91% rename from .github/workflows/python-package-testing.yml rename to .github/workflows/main-branch-testing.yml index 90902c8..bcf01f2 100644 --- a/.github/workflows/python-package-testing.yml +++ b/.github/workflows/main-branch-testing.yml @@ -4,21 +4,20 @@ on: push: branches: [ "main" ] pull_request: - branches: [ "main", "v*" ] + branches: [ "main" ] jobs: build: - runs-on: ubuntu-latest container: - image: python:3.11-slim + image: python:3.10-slim env: NODE_VERSION: 20 strategy: fail-fast: false matrix: - python-version: ["3.10", "3.11"] + python-version: ["3.10", "3.11", "3.12"] steps: - name: Install Node.js diff --git a/.github/workflows/version-branch-testing.yml b/.github/workflows/version-branch-testing.yml new file mode 100644 index 0000000..f325cba --- /dev/null +++ b/.github/workflows/version-branch-testing.yml @@ -0,0 +1,33 @@ +name: Version Branch CI/CD + +on: + pull_request: + branches: ["v*"] + +jobs: + pytest: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4.1.6 + with: + fetch-depth: 0 + - name: Install the latest version of Rye + uses: eifinger/setup-rye@v3.0.2 + - name: Setup the environment + run: rye sync --all-features + - name: Test with pytest + run: rye run pytest --cov=agogos --cov-branch --cov-fail-under=95 tests + + build: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4.1.6 + - name: Install the latest version of Rye + uses: eifinger/setup-rye@v3.0.2 + - name: Build the package + run: rye build + - uses: actions/upload-artifact@v4.3.3 + with: + path: ./dist