Skip to content

Commit

Permalink
Merge branch 'release/5.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
JackMorganNZ committed Sep 27, 2022
2 parents 51a0b65 + fc19ea3 commit 8f47942
Show file tree
Hide file tree
Showing 265 changed files with 4,701 additions and 1,115 deletions.
8 changes: 8 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,23 @@ updates:
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 999
- package-ecosystem: "npm"
directory: "/codewof/"
schedule:
interval: "daily"
open-pull-requests-limit: 999
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 999
ignore:
# Ignore updates to Django package until LTS version
- dependency-name: "django"
versions: ["4.0.X", "4.1.X", "5.0.X", "5.1.X", "6.0.X", "6.1.X", "7.0.X", "7.1.X"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
open-pull-requests-limit: 999
30 changes: 30 additions & 0 deletions .github/workflows/auto-merge-dependency-updates.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Auto-merge minor dependency updates

on: pull_request

permissions:
pull-requests: write
contents: write

jobs:
check-pull-request:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Approve
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr review --body "Automatic approval for minor dependency update." --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Merge
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
59 changes: 31 additions & 28 deletions .github/workflows/test-and-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Test and deploy
on:
workflow_dispatch:
push:
pull_request:
release:
types: [published]

Expand All @@ -16,39 +17,39 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Create Docker network
run: docker network create uccser-development-proxy
run: docker network create uccser-development-stack
- name: Start systems
run: docker-compose -f docker-compose.local.yml up -d
run: docker compose -f docker-compose.local.yml up -d
- name: Run Django system check
run: docker-compose -f docker-compose.local.yml run --rm django python ./manage.py check --fail-level WARNING
run: docker compose -f docker-compose.local.yml run --rm django python ./manage.py check --fail-level WARNING

test-content:
name: Tests - Content
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Create Docker network
run: docker network create uccser-development-proxy
run: docker network create uccser-development-stack
- name: Start systems
run: docker-compose -f docker-compose.local.yml up -d
run: docker compose -f docker-compose.local.yml up -d
- name: Create static files
run: docker-compose -f docker-compose.local.yml run --rm --user="root" node npm run dev
run: docker compose -f docker-compose.local.yml run --rm --user="root" node npm run generate-assets
- name: Migrate database
run: docker-compose -f docker-compose.local.yml run --rm django python ./manage.py migrate
run: docker compose -f docker-compose.local.yml run --rm django python ./manage.py migrate
- name: Run update_data command
run: docker-compose -f docker-compose.local.yml run --rm django python ./manage.py update_data
run: docker compose -f docker-compose.local.yml run --rm django python ./manage.py update_data
- name: Collect static files
run: docker-compose -f docker-compose.local.yml run --rm --user="root" django python ./manage.py collectstatic --no-input
run: docker compose -f docker-compose.local.yml run --rm --user="root" django python ./manage.py collectstatic --no-input

test-general:
name: Tests - General
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run general tests
run: ./dev ci test_general

Expand All @@ -57,16 +58,17 @@ jobs:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run style tests
run: ./dev ci style

create-static-files:
name: Create static files
if: |
(github.ref == 'refs/heads/develop')
(github.ref == 'refs/heads/develop'
|| startsWith(github.ref, 'refs/heads/research-study-')
|| github.event_name == 'release'
|| github.event_name == 'release')
&& github.event_name != 'pull_request'
runs-on: ubuntu-20.04
needs: [
test-django-system-check,
Expand All @@ -76,25 +78,25 @@ jobs:
]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Create Docker network
run: docker network create uccser-development-proxy
run: docker network create uccser-development-stack

- name: Start system
run: docker-compose -f docker-compose.local.yml up -d
run: docker compose -f docker-compose.local.yml up -d

- name: Create production static files
run: docker-compose -f docker-compose.local.yml run --rm --user="root" node npm run build
run: docker compose -f docker-compose.local.yml run --rm --user="root" node npm run generate-production-assets

- name: Collect staticfiles
run: docker-compose -f docker-compose.local.yml run --rm --user="root" django python manage.py collectstatic --no-input
run: docker compose -f docker-compose.local.yml run --rm --user="root" django python manage.py collectstatic --no-input

- name: Archive static files
run: tar czf static-files.tar.gz --directory codewof/staticfiles/ .

- name: Upload artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: static-files
path: static-files.tar.gz
Expand All @@ -103,19 +105,20 @@ jobs:
publish-docker-image:
name: Create and publish Docker image
if: |
(github.ref == 'refs/heads/develop')
(github.ref == 'refs/heads/develop'
|| startsWith(github.ref, 'refs/heads/research-study-')
|| github.event_name == 'release'
|| github.event_name == 'release')
&& github.event_name != 'pull_request'
runs-on: ubuntu-20.04
needs: [
create-static-files,
]
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Download all workflow run artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
path: artifacts/

Expand All @@ -128,23 +131,23 @@ jobs:
tar -xz --file artifacts/static-files/static-files.tar.gz --directory codewof/staticfiles
- name: Log in to the Container registry
uses: docker/login-action@v1.10.0
uses: docker/login-action@v2.0.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Setup Docker metadata
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=tag,priority=1
type=ref,event=branch,priority=2
- name: Build and push Docker image
uses: docker/build-push-action@v2.7.0
uses: docker/build-push-action@v3.1.1
with:
file: ./infrastructure/production/django/Dockerfile
context: .
Expand Down
81 changes: 0 additions & 81 deletions .travis.yml

This file was deleted.

68 changes: 68 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,73 @@
# Changelog

## 5.0.0

- Add question recommendations to users.
- Track proficiency of users' programming skills, using this information to suggest exercises for the user to perform.
- Add descriptive tags for each programming question.
- Add filtering of questions by question type, difficulty, contexts, and concepts.
- Add 15 new Python 3 questions.
- Contact emails show which domain they were sent from.
- Add URL for website status information.
- Allow 'likes' to be viewed in the admin interface.
- Disable API on production website.
- Use HTML templates for emails, replacing current plaintext emails.
- Add `update_data` management command for consistency across UCCSER repositories.
- Enable CORS headers for providing version information across domains.
- Set Gulp to watch for changed files and rebuild them as required.
- Update project to use uccser-development-stack v3.
- Auto-merge minor dependency updates (this includes minor and patch updates).
- Allow all dependency update pull requests to be created (remove open limit on Dependabot).
- Add OCI labels to Django Docker image.
- Ignore updates to non-LTS Django packages.
- Remove outdated helper script.
- Remove unused Travis CI configuration file.
- Remove unused Browser Sync functionality within Gulpfile.
- Dependency updates:
- Add django-cors-headers 3.13.0.
- Update ansi-colors from 4.1.1 to 4.1.3.
- Update argon2-cffi from 19.2.0 to 21.3.0.
- Update autoprefixer from 10.3.1 to 10.4.12.
- Update bootstrap from 4.6.0 to 4.6.2.
- Update clipboard from 2.0.8 to 2.0.11.
- Update codemirror from 5.63.1 to 5.65.1.
- Update coverage from 6.0.2 to 6.4.4.
- Update cssnano from 5.0.8 to 5.1.13.
- Update django from 3.2.6 to 3.2.15.
- Update django-allauth from 0.45.0 to 0.51.0.
- Update django-anymail[mailgun] from 7.0.0 to 8.6.
- Update django-ckeditor from 6.1.0 to 6.5.1.
- Update django-crispy-forms from 1.9.0 to 1.14.0.
- Update django-debug-toolbar from 3.2.2 to 3.6.0.
- Update django-environ from 0.4.5 to 0.9.0.
- Update django-extensions from 3.0.8 to 3.2.1.
- Update django-filter from 21.1 to 22.1.
- Update django-model-utils from 4.1.1 to 4.2.0.
- Update django-modeltranslation from 0.17.3 to 0.18.4.
- Update django-recaptcha from 2.0.6 to 3.0.0.
- Update djangorestframework from 3.12.4 to 3.14.0.
- Update factory-boy from 2.12.0 to 3.2.1.
- Update fancy-log from 1.3.3 to 2.0.0.
- Update flake8-docstrings from 1.5.0 to 1.6.0.
- Update flake8-quotes from 2.1.1 to 3.3.1.
- Update fuse.js from 6.4.6 to 6.6.2.
- Update gulp-postcss from 9.0.0 to 9.0.1.
- Update gulp-sass from 5.0.0 to 5.1.0.
- Update intro.js from 4.2.2 to 6.0.0.
- Update jquery from 3.6.0 to 3.6.1.
- Update mypy from 0.782 to 0.971.
- Update postcss from 8.3.6 to 8.4.16.
- Update psycopg2 from 2.9.1 to 2.9.3.
- Update pytest from 6.2.5 to 7.1.3.
- Update pytest-django 3.9.0 to 4.5.2.
- Update pytest-sugar from 0.9.4 to 0.9.5.
- Update pytz from 2019.3 to 2022.2.1.
- Update sass from 1.42.1 to 1.55.0.
- Update sortablejs from 1.8.4 to 1.15.0.
- Update whitenoise from 5.3.0 to 6.2.0.
- Update yargs from 7.1.1 to 7.5.1.
- Remove browser-sync 2.27.5.

## 4.0.0

- Add user groups, including invite functionality.
Expand Down
2 changes: 1 addition & 1 deletion codewof/config/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Configuration for Django system."""

__version__ = "4.0.0"
__version__ = "5.0.0"
__version_info__ = tuple(
[
int(num) if num.isdigit() else num
Expand Down
Loading

0 comments on commit 8f47942

Please sign in to comment.