Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ lib/PIL*
lib/django/
.git
^(.*/)?.*\.pyc
ubyssey/static/
ubyssey/static/
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
This template is for an issue.
This template is for an issue.
If the issue is for feature request, please start clean and tell us why and what feature you want
-->

Expand Down
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@

<!--
Include a summary of the change.
-->
-->
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ updates:
schedule:
interval: "weekly"
open-pull-requests-limit: 20

- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/ubyssey/static_src" # Location of package manifests
schedule:
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@ name: Release and Deploy
on:
release:
types: [released]



# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version: [ 3.8 ]

python-version: [3.8]

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand Down Expand Up @@ -42,12 +40,12 @@ jobs:
DEPLOYMENT_ENV_VARS: ${{ secrets.DEPLOYMENT_ENV_VARS }}
- name: Install Python packages and dependencies
run: |
pip install -r requirements-prd.txt --use-pep517
pip install -r requirements-prd.txt --use-pep517
pip install requests --upgrade
- name: Set up Node.js environment
uses: actions/[email protected]
with:
node-version: 14.x
node-version: 14.x
- name: Run gulp to ready frontend static files for production
run: |
cd ubyssey/static_src
Expand All @@ -67,16 +65,16 @@ jobs:
rm -rf tmp/
export DJANGO_SETTINGS_MODULE="config.settings.production"
pip install -I google-cloud-storage==1.44.0 -t lib/
- id: 'auth'
- id: "auth"
name: Authenticate with Google App Engine
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- id: 'deploy'
- id: "deploy"
name: Deploy to Google App Engine
uses: google-github-actions/deploy-appengine@v1
with:
project_id: ubyssey-prd
- id: 'test'
- id: "test"
name: Test output of deployment
run: 'curl "${{ steps.deploy.outputs.url }}"'
run: 'curl "${{ steps.deploy.outputs.url }}"'
9 changes: 4 additions & 5 deletions .github/workflows/super-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ name: Lint Code Base

on:
push:
branches: [ "develop" ]
branches: ["develop"]
pull_request:
branches: [ "develop" ]
branches: ["develop"]
jobs:
run-lint:
runs-on: ubuntu-latest
Expand All @@ -32,11 +32,10 @@ jobs:
VALIDATE_CSS: false
VALIDATE_HTML: false
VALIDATE_MARKDOWN: false

IGNORE_GENERATED_FILE: true
IGNORE_GITIGNORED_FILES: true

PYTHON_BLACK_CONFIG_FILE: .github/linters/pyproject.toml
PYTHON_ISORT_CONFIG_FILE: .github/linters/pyproject.toml
PYTHON_FLAKE8_CONFIG_FILE: .github/linters/.flake8

31 changes: 15 additions & 16 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ name: Cross-browser test automation

on:
push:
branches: [ "develop" ]
branches: ["develop"]
pull_request:
branches: [ "develop" ]

branches: ["develop"]

jobs:
test:
Expand All @@ -22,21 +21,21 @@ jobs:
env:
MYSQL_ROOT_PASSWORD: ubyssey
MYSQL_DATABASE: ubyssey
ports: ['3306:3306']
ports: ["3306:3306"]
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=3

selenium-chrome:
image: selenium/standalone-chrome:latest
ports:
- 4444:4444
- 7900:7900
options: >-
--shm-size=2g

selenium-edge:
image: selenium/standalone-edge:latest
ports:
Expand All @@ -48,8 +47,8 @@ jobs:
selenium-firefox:
image: selenium/standalone-firefox:latest
ports:
- 4446:4444
- 7902:7900
- 4446:4444
- 7902:7900
options: >-
--shm-size=2g

Expand All @@ -61,12 +60,12 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Python packages and dependencies
run: |
pip install -r requirements-prd.txt --use-pep517
pip install -r requirements-prd.txt --use-pep517
pip install requests --upgrade
- name: Set up Node.js environment
uses: actions/[email protected]
with:
node-version: 14.x
node-version: 14.x
- name: Run gulp to ready frontend static files for production
run: |
cd ubyssey/static_src
Expand Down Expand Up @@ -95,34 +94,34 @@ jobs:
export BROWSER=chrome
export CI_ENVIRONMENT=testing
python manage.py test
env:
env:
SQL_HOST: 0.0.0.0
SQL_DATABASE: ubyssey
SQL_USER: root
SQL_PASSWORD: ubyssey

- name: Run test on firefox browser
run: |
export DJANGO_SETTINGS_MODULE="config.settings.development"
pip install selenium
export BROWSER=firefox
export CI_ENVIRONMENT=testing
python manage.py test
env:
env:
SQL_HOST: 0.0.0.0
SQL_DATABASE: ubyssey
SQL_USER: root
SQL_PASSWORD: ubyssey

- name: Run test on edge browser
run: |
export DJANGO_SETTINGS_MODULE="config.settings.development"
pip install selenium
export BROWSER=edge
export CI_ENVIRONMENT=testing
python manage.py test
env:
env:
SQL_HOST: 0.0.0.0
SQL_DATABASE: ubyssey
SQL_USER: root
SQL_PASSWORD: ubyssey
SQL_PASSWORD: ubyssey
31 changes: 31 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-yaml
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'

- id: end-of-file-fixer
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'

- id: trailing-whitespace
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 23.9.1
hooks:
- id: black
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'

- repo: https://github.com/pycqa/isort
rev: 5.12.0
hooks:
- id: isort
name: isort (python)
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'

- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.5.1
hooks:
- id: prettier
exclude: '(/migrations/|/config/|/__pycache__/|.*\.html$)'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Once you have your local environment configured, follow [the steps here](https:/

## Contributing

You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository. We welcome volunteers to help make student journalism better! Head over to the [Getting Started Guide](https://code.ubyssey.ca/getting-started) to get started.
You can open issues for bugs you've found or features you think are missing. You can also submit pull requests to this repository. We welcome volunteers to help make student journalism better! Head over to the [Getting Started Guide](https://code.ubyssey.ca/getting-started) to get started.

<br>

Expand Down
4 changes: 2 additions & 2 deletions ads/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@


class AdsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'ads'
default_auto_field = "django.db.models.BigAutoField"
name = "ads"
Loading
Loading