From bc6e18b6d65e7bb192a76a73db3bb5cdffa135d5 Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 09:45:43 -0400 Subject: [PATCH 1/6] Updating Pytest criteria --- .github/workflows/dev-pytest.yml | 34 ++++++++++++++++++++++++++++++++ .github/workflows/pytest.yml | 19 ++++++++++++------ 2 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/dev-pytest.yml diff --git a/.github/workflows/dev-pytest.yml b/.github/workflows/dev-pytest.yml new file mode 100644 index 00000000..02ed99f6 --- /dev/null +++ b/.github/workflows/dev-pytest.yml @@ -0,0 +1,34 @@ +name: pytest + +on: + push: + branches: + - dev + + pull_request: + types: [opened, reopened] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Update pip + run: | + python -m pip install --upgrade pip + - name: Install dependencies + run: | + python -m pip install -e .[dev] + - name: Test with pytest + run: | + pytest diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 96e788c4..c31d4ded 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -1,20 +1,27 @@ name: pytest -on: [push] +on: + push: + branches: + - master + + pull_request: + types: [opened, reopened] jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + os: ["ubuntu-latest", "macos-latest", "windows-latest"] + python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v3 + - uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} on ${{ matrix.os }} + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Update pip From 2a899302161958f35ceb26baa5d0393e1052b76f Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 10:02:02 -0400 Subject: [PATCH 2/6] Updating pytest github actions --- .github/workflows/dev-pytest.yml | 2 +- .github/workflows/pytest.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev-pytest.yml b/.github/workflows/dev-pytest.yml index 02ed99f6..3b80d82c 100644 --- a/.github/workflows/dev-pytest.yml +++ b/.github/workflows/dev-pytest.yml @@ -1,4 +1,4 @@ -name: pytest +name: dev-pytest on: push: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index c31d4ded..ff5db01a 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -1,4 +1,4 @@ -name: pytest +name: master-pytest on: push: From 5464f21ff8c7d4fe78fab5b5b6603045422d7e05 Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 10:05:57 -0400 Subject: [PATCH 3/6] Updating github-actions checks --- .github/workflows/dependency-review.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index da99d0c5..b9d6d20f 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -9,6 +9,6 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Checkout Repository' - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: 'Dependency Review' - uses: actions/dependency-review-action@v3 + uses: actions/dependency-review-action@v4 From 21b4f7f0a62c1db684821e43c2766a7cefe58e13 Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 10:15:01 -0400 Subject: [PATCH 4/6] run pytest only when commits are pushed to specific branch --- .github/workflows/dev-pytest.yml | 4 +--- .github/workflows/pytest.yml | 3 --- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.github/workflows/dev-pytest.yml b/.github/workflows/dev-pytest.yml index 3b80d82c..fda654c9 100644 --- a/.github/workflows/dev-pytest.yml +++ b/.github/workflows/dev-pytest.yml @@ -4,9 +4,7 @@ on: push: branches: - dev - - pull_request: - types: [opened, reopened] + jobs: build: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ff5db01a..e52f5108 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -4,9 +4,6 @@ on: push: branches: - master - - pull_request: - types: [opened, reopened] jobs: build: From a45ce7aeecc4c7465b8dc37f2c2f3f4a9407f1ad Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 11:04:16 -0400 Subject: [PATCH 5/6] limiting dev test to a single pyhon version on ubuntu --- .github/workflows/dev-pytest.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dev-pytest.yml b/.github/workflows/dev-pytest.yml index fda654c9..6a754cef 100644 --- a/.github/workflows/dev-pytest.yml +++ b/.github/workflows/dev-pytest.yml @@ -12,15 +12,13 @@ jobs: runs-on: ubuntu-latest strategy: fail-fast: false - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} + - name: Set up Python 3.11 uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: "3.11" - name: Update pip run: | python -m pip install --upgrade pip From f1c2afe3275ecc34162a0a3d848dbfb171432d87 Mon Sep 17 00:00:00 2001 From: Tiji Mathew Date: Thu, 4 Apr 2024 11:08:40 -0400 Subject: [PATCH 6/6] Allow manual workflow trigger in dev --- .github/workflows/dev-pytest.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-pytest.yml b/.github/workflows/dev-pytest.yml index 6a754cef..177d2f6f 100644 --- a/.github/workflows/dev-pytest.yml +++ b/.github/workflows/dev-pytest.yml @@ -4,7 +4,9 @@ on: push: branches: - dev - + + workflow_dispatch: + jobs: build: