Skip to content

Commit

Permalink
Adds CI trigger for pull requests (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
djperrefort authored Jun 30, 2024
1 parent 3f373ad commit 426aaec
Show file tree
Hide file tree
Showing 5 changed files with 113 additions and 7 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/PullRequest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🎯 Pull Request

on:
pull_request:

jobs:
build:
name: Build
uses: ./.github/workflows/Build.yml

test:
name: Test
needs: build
uses: ./.github/workflows/Test.yml

qa:
name: QA
needs: build
uses: ./.github/workflows/QA.yml
secrets: inherit

report-pr-status:
name: Report PR Status
runs-on: ubuntu-latest
needs: [ test, qa ]
if: always()

steps:
- name: Check PR status
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled') }}
run: exit 1
7 changes: 4 additions & 3 deletions .github/workflows/Test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ jobs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [ 3.8, 3.9, 3.10, 3.11, 3.12 ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12" ]

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
Expand All @@ -27,7 +28,7 @@ jobs:
virtualenvs-create: false

- name: Install dependencies
run: poetry install
run: poetry install --with tests

- name: Run tests with coverage
run: poetry run coverage run -m unittest discover
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/UpdatedMain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,8 @@ jobs:
needs: build
uses: ./.github/workflows/QA.yml
secrets: inherit

test:
name: Test
needs: build
uses: ./.github/workflows/Test.yml
66 changes: 65 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "keystone-client"
version = "0.0.0"
Expand All @@ -10,7 +14,8 @@ python = "^3.8"
requests = "^2.32.3"
pyjwt = "^2.8.0"

[tool.poetry.group.tests]
optional = true

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.group.tests.dependencies]
coverage = "*"

0 comments on commit 426aaec

Please sign in to comment.