Skip to content

Commit 5be64e1

Browse files
Editing GH workflows
1 parent b7c219c commit 5be64e1

File tree

5 files changed

+43
-152
lines changed

5 files changed

+43
-152
lines changed

.github/workflows/extended-tests-integration.yml

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,25 @@
1-
# Extended testing using Python 3.9, 3.10, 3.11 & 3.12 INCLUDING integration tests
2-
# Triggered by a pull request to main branch created
3-
# Triggered by a pull request to main branch updated by a new commit
4-
# Triggered by a pull request to main branch converted from drat to regular (non-draft)
5-
# EXCEPTION for draft pull request: EXCLUDING integration tests, upload test results & code cov.
1+
# Extended testing, INCLUDDING integration tests
2+
# Python:
3+
# - 3.9
4+
# - 3.10
5+
# - 3.11
6+
# - 3.12
7+
# Triggered by:
8+
# - Creating a new PR to main branch
9+
# - Addind commit(s) to an existing PR to main branch
10+
# - Addind commit(s) to main branch:
11+
# - Direct commit without PR
12+
# - Updating the out-of-date base branch to an existing PR to main branch
613

714
name: extended-tests-integration
815

916
on:
17+
push:
18+
branches: [main]
1019
pull_request:
1120
branches: [main]
12-
types: [opened, synchronize, ready_for_review]
21+
types: [opened, synchronize]
22+
workflow_dispatch:
1323

1424
jobs:
1525

@@ -44,19 +54,6 @@ jobs:
4454
black --check -S -l 100 pori_python tests
4555
4656
- name: Tests with pytest, including integration tests
47-
if: ${{ github.event.pull_request.draft == true }}
48-
run: |
49-
pip list
50-
pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov pori_python --cov-report term --cov-report xml
51-
env:
52-
IPR_USER: ${{ secrets.IPR_TEST_USER }}
53-
IPR_PASS: ${{ secrets.IPR_TEST_PASSWORD }}
54-
GRAPHKB_USER: ${{ secrets.GKB_TEST_USER }}
55-
GRAPHKB_PASS: ${{ secrets.GKB_TEST_PASS }}
56-
EXCLUDE_INTEGRATION_TESTS: 1
57-
58-
- name: Tests with pytest, including integration tests
59-
if: ${{ github.event.pull_request.draft == false }}
6057
run: |
6158
pip list
6259
pytest --junitxml=junit/test-results-${{ matrix.python-version }}.xml --cov pori_python --cov-report term --cov-report xml
@@ -68,21 +65,15 @@ jobs:
6865
EXCLUDE_INTEGRATION_TESTS: 0
6966

7067
- name: Upload pytest test results
71-
if: ${{ (
72-
github.event.pull_request.draft == false &&
73-
matrix.python-version == '3.9'
74-
) }}
68+
if: ${{ matrix.python-version == '3.9' }}
7569
uses: actions/upload-artifact@v4
7670
with:
7771
name: pytest-results-${{ matrix.python-version }}
7872
path: junit/test-results-${{ matrix.python-version }}.xml
7973
# Use always() to always run this step to publish test results when there are test failures
8074

8175
- name: Update code coverage report to CodeCov
82-
if: ${{ (
83-
github.event.pull_request.draft == false &&
84-
matrix.python-version == '3.9'
85-
) }}
76+
if: ${{ matrix.python-version == '3.9' }}
8677
uses: codecov/codecov-action@v5
8778
with:
8879
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/pytest.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.github/workflows/quick-pytest.yml

Lines changed: 0 additions & 46 deletions
This file was deleted.

.github/workflows/quick-tests-integration.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,26 @@
1-
# Limited testing using Python 3.9 only INCLUDING integration tests
2-
# Triggered by a regular (non-draft) pull request created, except to main branch
3-
# Triggered by a regular (non-draft) pull request updated by a new commit, except to main branch
4-
# Triggered by a draft pull request to develop branch converted into a regular (non-draft) one
1+
# Limited testing, INCLUDING integration tests
2+
# Python:
3+
# - 3.9
4+
# Triggered by:
5+
# - Creating a new PR to develop branch
6+
# - Addind commit(s) to an existing PR to develop branch
7+
# - Addind commit(s) to develop branch:
8+
# - Direct commit without PR
9+
# - Updating the out-of-date base branch to an existing PR to develop branch
510

611
name: quick-tests-integration
712

813
on:
14+
push:
15+
branches: [develop]
916
pull_request:
1017
branches: [develop]
11-
types: [opened, synchronize, ready_for_review]
18+
types: [opened, synchronize]
19+
workflow_dispatch:
1220

1321
jobs:
1422

1523
quick-tests-integration:
16-
if: ${{ github.event.pull_request.draft == false }}
1724
runs-on: ubuntu-latest
1825
steps:
1926
- name: Checkout repository

.github/workflows/quick-tests.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,25 @@
1-
# Limited testing using Python 3.9 only EXCLUDING integration tests
2-
# Triggered by any push (new branch, or new commit to any branch), EXCEPT
3-
# if that branch is part of a regular (non-draft) pull request
1+
# Limited testing, EXCLUDING integration tests
2+
# Python:
3+
# - 3.9
4+
# Triggered by:
5+
# - Pushing a new branch
6+
# - Addind commit(s) to a branch that is not main or develop, and that is not part of a PR to develop or main branch
47

58
name: quick-tests
69

710
on:
811
push:
12+
branches-ignore: [main, develop]
13+
workflow_dispatch:
914

1015
jobs:
1116

1217
quick-tests:
1318
if: ${{ !(
14-
github.event.pull_request &&
15-
github.event.pull_request.draft == false
19+
github.event.pull_request && (
20+
github.event.pull_request.base.ref == 'main' ||
21+
github.event.pull_request.base.ref == 'develop'
22+
)
1623
) }}
1724
runs-on: ubuntu-latest
1825
steps:

0 commit comments

Comments
 (0)