Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds CI trigger for pull requests #1

Merged
merged 6 commits into from
Jun 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = "*"
Loading