Skip to content

Merge branch 'main' into bulk_transfer_students #415

Merge branch 'main' into bulk_transfer_students

Merge branch 'main' into bulk_transfer_students #415

Workflow file for this run

name: Main
on:
push:
branches: ["*"] # Run only when push to branches (not tags).
paths-ignore:
- "codeforlife/version.py"
- "**/*.md"
- ".vscode/**"
- ".*"
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
release:
concurrency: release
runs-on: ubuntu-latest
needs: [test]
if: github.ref_name == 'main'
steps:
- name: 🛫 Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
fetch-depth: 0
- name: 🐍 Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: 🛠 Install Dependencies
run: |
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: 🚀 Publish Semantic Release
env:
GH_TOKEN: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
run: semantic-release publish --verbosity=INFO