Skip to content

Commit

Permalink
Merge branch 'master' into losctf
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusOstermayer committed Jul 2, 2024
2 parents b94fabe + 451a83a commit 9916f38
Show file tree
Hide file tree
Showing 554 changed files with 37,639 additions and 17,605 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
python-version: ['3.9']
python-version: ['3.11']

name: Linting
steps:
Expand All @@ -23,9 +23,9 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r development.txt
sudo yarn install --non-interactive
sudo yarn global add prettier@1.17.0
python -m pip install -r linting.txt
sudo yarn --cwd CTFd/themes/admin install --non-interactive
sudo yarn global add prettier@^3.2.5
- name: Lint
run: make lint
Expand All @@ -39,6 +39,9 @@ jobs:

- name: Lint docker-compose
run: |
python -m pip install docker-compose==1.26.0
docker-compose -f docker-compose.yml config
docker compose -f docker-compose.yml config
- name: Lint translations
run: |
make translations-lint
59 changes: 59 additions & 0 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
---
name: CTFd MariaDB CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:

runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:10.11
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: ctfd
ports:
- 3306
redis:
image: redis
ports:
- 6379:6379

strategy:
matrix:
python-version: ['3.11']

name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v2
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r development.txt
sudo yarn install --non-interactive
- name: Test
run: |
sudo rm -f /etc/boto.cfg
make test
env:
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
TESTING_DATABASE_URL: mysql+pymysql://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/ctfd

- name: Codecov
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
12 changes: 9 additions & 3 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: CTFd MySQL CI

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -22,7 +28,7 @@ jobs:

strategy:
matrix:
python-version: ['3.9']
python-version: ['3.11']

name: Python ${{ matrix.python-version }}
steps:
Expand All @@ -48,6 +54,6 @@ jobs:
TESTING_DATABASE_URL: mysql+pymysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/ctfd

- name: Codecov
uses: codecov/codecov-action@v1.0.11
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
12 changes: 9 additions & 3 deletions .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: CTFd Postgres CI

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
Expand Down Expand Up @@ -29,7 +35,7 @@ jobs:

strategy:
matrix:
python-version: ['3.9']
python-version: ['3.11']

name: Python ${{ matrix.python-version }}
steps:
Expand All @@ -55,7 +61,7 @@ jobs:
TESTING_DATABASE_URL: postgres://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/ctfd

- name: Codecov
uses: codecov/codecov-action@v1.0.11
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml

12 changes: 9 additions & 3 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
---
name: CTFd SQLite CI

on: [push, pull_request]
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
build:
Expand All @@ -10,7 +16,7 @@ jobs:

strategy:
matrix:
python-version: ['3.9']
python-version: ['3.11']

name: Python ${{ matrix.python-version }}
steps:
Expand All @@ -37,7 +43,7 @@ jobs:
TESTING_DATABASE_URL: 'sqlite://'

- name: Codecov
uses: codecov/codecov-action@v1.0.11
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml

4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ nosetests.xml
coverage.xml

# Translations
*.mo
*.pot
# TODO: CTFd 4.0 We should consider generating .mo files in a Docker image instead of saving them in git
# *.mo

# Django stuff:
*.log
Expand Down
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
CTFd/themes/**/vendor/
CTFd/themes/core/
CTFd/themes/core-beta/**/*
CTFd/themes/admin/static/**/*
*.html
*.njk
*.png
Expand Down
Loading

0 comments on commit 9916f38

Please sign in to comment.