-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix: initial * fix: delete unused files * fix: make pylint happy * fix: school 2 sessions fixture * fix: add github actions extension * fix: make migrations * fix: test python code * fix: output python version * test * add dummy step * double set py version * fix import sort * fix: static type hints * fix: add test clients * merge from main * fix: add todo * fix: new portal version * fix: lock file * test new python setup * add todo * set back to main
- Loading branch information
Showing
19 changed files
with
205 additions
and
172 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 |
---|---|---|
|
@@ -10,54 +10,29 @@ on: | |
- ".*" | ||
workflow_dispatch: | ||
|
||
env: | ||
PYTHON_VERSION: 3.8 | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [3.8] | ||
steps: | ||
- name: 🛫 Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: 🐍 Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: 🛠 Install Dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install pipenv | ||
pipenv install --dev | ||
- name: 🔎 Check Code Format | ||
run: if ! pipenv run black --check .; then exit 1; fi | ||
|
||
- name: 🔎 Check Migrations | ||
run: pipenv run python manage.py makemigrations --check --dry-run | ||
|
||
# TODO: assert code coverage target. | ||
- name: 🧪 Test Code Units | ||
run: pipenv run pytest | ||
uses: ocadotechnology/codeforlife-workspace/.github/workflows/test-python-code.yaml@main | ||
with: | ||
# Cannot be set with an env var. Value must match in the release job. | ||
python-version: 3.8 | ||
|
||
release: | ||
concurrency: release | ||
runs-on: ubuntu-latest | ||
needs: [test] | ||
if: github.ref_name == 'main' | ||
env: | ||
# Value must match in the test job. | ||
PYTHON_VERSION: 3.8 | ||
steps: | ||
- name: 🛫 Checkout | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: 🐍 Set up Python | ||
- name: 🐍 Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
@@ -67,10 +42,8 @@ jobs: | |
python -m pip install --upgrade pip | ||
python -m pip install python-semantic-release~=7.33 | ||
- name: ⚙️ Configure Git | ||
run: | | ||
git config --local user.name cfl-bot | ||
git config --local user.email [email protected] | ||
- name: 🤖 Set up cfl-bot as Git User | ||
uses: ocadotechnology/codeforlife-workspace/.github/actions/git/setup-bot@main | ||
|
||
- name: 🚀 Publish Semantic Release | ||
env: | ||
|
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
Large diffs are not rendered by default.
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 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
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
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