-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#13] Refactor after open-api-workflow d6a9fe1ff6c9ac6487839cda5907de…
…6049d8aaec
- Loading branch information
Showing
14 changed files
with
75 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,25 +19,25 @@ env: | |
jobs: | ||
# determine changed files to decide if certain jobs can be skipped or not | ||
changed-files: | ||
runs-on: ubuntu-latest # windows-latest | macos-latest | ||
runs-on: ubuntu-latest | ||
name: Determine changed files | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: Get changed PY files | ||
id: changed-py-files | ||
uses: tj-actions/changed-files@v41 | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files: | | ||
^src/.+\.py | ||
files: src/{,**/}*.py | ||
|
||
- name: Get changed requirements files | ||
id: changed-requirements | ||
uses: tj-actions/changed-files@v41 | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
files: ^requirements/.+\.txt$ | ||
files: requirements/*.txt | ||
|
||
outputs: | ||
changed-py-files: ${{ steps.changed-py-files.outputs.any_changed }} | ||
|
@@ -68,19 +68,12 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- name: Set up backend environment | ||
uses: maykinmedia/[email protected] | ||
with: | ||
python-version: '3.11' | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: '18' | ||
setup-node: true | ||
|
||
- name: Install dependencies | ||
run: pip install -r requirements/dev.txt codecov | ||
- name: Build frontend | ||
run: | | ||
npm ci | ||
npm run build | ||
- name: Run tests | ||
run: | | ||
python src/manage.py collectstatic --noinput --link | ||
|
@@ -103,7 +96,7 @@ jobs: | |
cache: 'pip' | ||
cache-dependency-path: 'requirements/*.txt' | ||
- name: Install dependencies | ||
run: pip install -r requirements/ci.txt pytest | ||
run: pip install -r requirements/ci.txt | ||
- name: Generate environment variable documentation using OAf and check if it was updated | ||
run: | | ||
bin/generate_envvar_docs.sh | ||
|
@@ -119,7 +112,6 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
image-name: ${{ steps.image-name.outputs.image-name }} | ||
sphinx-ssl-conf: ${{ steps.sphinx-ssl-conf.outputs.sphinx-ssl-conf }} | ||
|
||
steps: | ||
- run: echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT | ||
|
@@ -136,3 +128,6 @@ jobs: | |
python-version: '3.11' | ||
docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} | ||
repository-owner: 'maykinmedia' | ||
secrets: | ||
docker-username: ${{ secrets.DOCKER_USERNAME }} | ||
docker-token: ${{ secrets.DOCKER_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: check-oas | ||
|
||
on: | ||
push: | ||
paths: | ||
- "src/openklant/components/*/openapi.yaml" | ||
- .github/workflows/oas-check.yml | ||
branches: | ||
- '**' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
open-api-workflow-check-oas: | ||
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@initial-setup | ||
strategy: | ||
matrix: | ||
component: | ||
- contactgegevens | ||
- klantinteracties | ||
with: | ||
schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' | ||
schema-command: 'spectacular_for_component' | ||
schema-options: "--component ${{ matrix.component }}" | ||
python-version: '3.11' | ||
django-settings-module: 'openklant.conf.ci' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
18 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
codecov | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters