Skip to content

Commit

Permalink
merge les config gh-actions
Browse files Browse the repository at this point in the history
  • Loading branch information
etchegom committed Dec 18, 2023
1 parent 6658221 commit 3139a92
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 29 deletions.
26 changes: 0 additions & 26 deletions .github/workflows/lint.yaml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/push-branch-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
DEBUG: False

jobs:
check:
uses: ./.github/workflows/run_check.yml

test:
uses: ./.github/workflows/run_tests.yml

Expand All @@ -26,6 +29,7 @@ jobs:
ssh-private-key: ${{ secrets.SCALINGO_SSH_PRIVATE_KEY }}
app-name: apilos-staging
known-host: ssh.osc-fr1.scalingo.com

deploy_to_siap_integration:
name: "Deploy to Siap Integration"
runs-on: ubuntu-latest
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/push-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ env:
DEBUG: False

jobs:
check:
uses: ./.github/workflows/run_check.yml

coverage:
name: Test & Coverage

Expand All @@ -42,19 +45,25 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.10.8"

- name: Install dependencies
run: pip install -r requirements.txt -r dev-requirements.txt

- name: Check migrations
run: |
python manage.py makemigrations --check --dry-run
- name: Execute test with coverage
run: |
coverage run -m pytest
- name: Create coverage report
run: coverage xml -o coverage.xml

- name: Post coverage to PR
uses: orgoro/coverage@v3
with:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/push-version-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ env:
DEBUG: False

jobs:
check:
uses: ./.github/workflows/run_check.yml

test:
uses: ./.github/workflows/run_tests.yml

Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/run_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
workflow_call:

jobs:
check:
name: Check

runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10.8"

- name: Setup Pre-commit
uses: pre-commit/[email protected]

- uses: pre-commit-ci/[email protected]
if: always()
7 changes: 5 additions & 2 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,15 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
python-version: "3.10.8"

- name: Install dependencies
run: pip install -r requirements.txt -r dev-requirements.txt

- name: Check migrations
run: |
python manage.py makemigrations --check --dry-run
- name: Execute test
run: |
python manage.py test
python -m pytest

0 comments on commit 3139a92

Please sign in to comment.