diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90fa5fae..e69b783c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: branches: [master] pull_request: branches: - - '**' + - "**" workflow_dispatch: defaults: @@ -18,29 +18,29 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] + os: [ubuntu-latest] python-version: - - '3.8' - - '3.11' + - "3.11" + - "3.12" toxenv: [py, quality] steps: - - uses: actions/checkout@v4 - - name: setup python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} + - uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} - - name: Install pip - run: pip install -r requirements/pip.txt + - name: Install pip + run: pip install -r requirements/pip.txt - - name: Install Dependencies - run: pip install -r requirements/ci.txt + - name: Install Dependencies + run: pip install -r requirements/ci.txt - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox # Tests that used to be in the cookiecutter-django-ida Makefile but # that have not yet been moved into the regular unit tests (which @@ -51,51 +51,51 @@ jobs: matrix: os: [ubuntu-20.04] python-version: - - '3.8' - - '3.11' + - "3.11" + - "3.12" steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.python-version }} - - - name: Generate demo project - run: | - make requirements - cookiecutter cookiecutter-django-ida --no-input - - - name: "Post-gen: Virtualenv, and set up requirements" - working-directory: repo_name - run: | - virtualenv .venv - source .venv/bin/activate - - make upgrade # TODO should be part of initial cookiecutter setup - make requirements - - - name: "Post-gen: Migrations" - working-directory: repo_name - run: | - source .venv/bin/activate - python manage.py makemigrations - make migrate - - - name: "Quality checks" - working-directory: repo_name - run: | - source .venv/bin/activate - make validate - - - name: "Ensure translations can be compiled" - working-directory: repo_name - run: | - source .venv/bin/activate - sudo apt install gettext # required for msguniq, called by makemessages management command - make fake_translations - - - name: "Ensure docker can build a container" - working-directory: repo_name - run: | - source .venv/bin/activate - docker build . --target app + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Generate demo project + run: | + make requirements + cookiecutter cookiecutter-django-ida --no-input + + - name: "Post-gen: Virtualenv, and set up requirements" + working-directory: repo_name + run: | + virtualenv .venv + source .venv/bin/activate + + make upgrade # TODO should be part of initial cookiecutter setup + make requirements + + - name: "Post-gen: Migrations" + working-directory: repo_name + run: | + source .venv/bin/activate + python manage.py makemigrations + make migrate + + - name: "Quality checks" + working-directory: repo_name + run: | + source .venv/bin/activate + make validate + + - name: "Ensure translations can be compiled" + working-directory: repo_name + run: | + source .venv/bin/activate + sudo apt install gettext # required for msguniq, called by makemessages management command + make fake_translations + + - name: "Ensure docker can build a container" + working-directory: repo_name + run: | + source .venv/bin/activate + docker build . --target app diff --git a/cookiecutter-django-app/{{cookiecutter.repo_name}}/.github/workflows/ci.yml b/cookiecutter-django-app/{{cookiecutter.repo_name}}/.github/workflows/ci.yml index 2b19f6c3..6ed9af88 100644 --- a/cookiecutter-django-app/{{cookiecutter.repo_name}}/.github/workflows/ci.yml +++ b/cookiecutter-django-app/{{cookiecutter.repo_name}}/.github/workflows/ci.yml @@ -5,8 +5,7 @@ on: branches: [main] pull_request: branches: - - '**' - + - "**" jobs: run_tests: @@ -14,32 +13,32 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, pii_check, django32, django40] + os: [ubuntu-latest] + python-version: ["3.11"] + toxenv: [quality, docs, pii_check, django42] steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Install Dependencies - run: pip install -r requirements/ci.txt - - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox - - - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests - fail_ci_if_error: true + - uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run coverage + if: matrix.python-version == '3.11' && matrix.toxenv == 'django42' + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + fail_ci_if_error: true diff --git a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/.github/workflows/check-reserved-keywords.yml b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/.github/workflows/check-reserved-keywords.yml index 7c535ade..22f8b335 100644 --- a/cookiecutter-django-ida/{{cookiecutter.repo_name}}/.github/workflows/check-reserved-keywords.yml +++ b/cookiecutter-django-ida/{{cookiecutter.repo_name}}/.github/workflows/check-reserved-keywords.yml @@ -6,16 +6,16 @@ on: jobs: check-reserved-keywords: name: Check Reserved Keywords - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/cookiecutter-xblock/{{cookiecutter.repo_name}}/.github/workflows/ci.yml b/cookiecutter-xblock/{{cookiecutter.repo_name}}/.github/workflows/ci.yml index 18cde08d..fc3bf27b 100644 --- a/cookiecutter-xblock/{{cookiecutter.repo_name}}/.github/workflows/ci.yml +++ b/cookiecutter-xblock/{{cookiecutter.repo_name}}/.github/workflows/ci.yml @@ -5,8 +5,7 @@ on: branches: [main] pull_request: branches: - - '**' - + - "**" jobs: run_tests: @@ -14,32 +13,32 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: [quality, docs, django32, django40] + os: [ubuntu-latest] + python-version: ["3.11"] + toxenv: [quality, docs, django42] steps: - - uses: actions/checkout@v3 - - name: setup python - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Install pip - run: pip install -r requirements/pip.txt - - - name: Install Dependencies - run: pip install -r requirements/ci.txt - - - name: Run Tests - env: - TOXENV: ${{ matrix.toxenv }} - run: tox - - - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'django32' - uses: codecov/codecov-action@v4 - with: - token: ${{ secrets.CODECOV_TOKEN }} - flags: unittests - fail_ci_if_error: true + - uses: actions/checkout@v4 + - name: setup python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Install pip + run: pip install -r requirements/pip.txt + + - name: Install Dependencies + run: pip install -r requirements/ci.txt + + - name: Run Tests + env: + TOXENV: ${{ matrix.toxenv }} + run: tox + + - name: Run coverage + if: matrix.python-version == '3.11' && matrix.toxenv == 'django42' + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} + flags: unittests + fail_ci_if_error: true diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/ci.yml b/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/ci.yml index 5d506484..d29bc218 100644 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/ci.yml +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/ci.yml @@ -2,11 +2,10 @@ name: Python CI on: push: - branches: [ main ] + branches: [main] pull_request: branches: - - '**' - + - "**" jobs: run_tests: @@ -14,14 +13,14 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04] - python-version: ['3.8'] - toxenv: ["py38", "quality", "docs", "pii_check"] + os: [ubuntu-latest] + python-version: ["3.11"] + toxenv: ["py311", "quality", "docs", "pii_check"] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} @@ -37,7 +36,7 @@ jobs: run: tox - name: Run coverage - if: matrix.python-version == '3.8' && matrix.toxenv == 'py38' + if: matrix.python-version == '3.11' && matrix.toxenv == 'py311' uses: codecov/codecov-action@v4 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/pypi-publish.yml b/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/pypi-publish.yml index a22e9e6a..5b9138a7 100644 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/pypi-publish.yml +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/.github/workflows/pypi-publish.yml @@ -5,17 +5,16 @@ on: types: [published] jobs: - push: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: setup python - uses: actions/setup-python@v2 + uses: actions/setup-python@v5 with: - python-version: 3.8 + python-version: 3.11 - name: Install pip run: pip install -r requirements/pip.txt diff --git a/python-template/{{cookiecutter.placeholder_repo_name}}/.readthedocs.yaml b/python-template/{{cookiecutter.placeholder_repo_name}}/.readthedocs.yaml index ce8bde28..c9226adc 100644 --- a/python-template/{{cookiecutter.placeholder_repo_name}}/.readthedocs.yaml +++ b/python-template/{{cookiecutter.placeholder_repo_name}}/.readthedocs.yaml @@ -14,7 +14,7 @@ sphinx: build: os: "ubuntu-22.04" tools: - python: "3.8" + python: "3.11" python: install: