Skip to content

Commit 409c16a

Browse files
Merge From CTFd/master
2 parents ea59dca + 90e4be4 commit 409c16a

File tree

448 files changed

+18491
-18697
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

448 files changed

+18491
-18697
lines changed

Diff for: .gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.sh text eol=lf

Diff for: .github/workflows/lint.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
name: Linting
3+
4+
on: [push, pull_request]
5+
6+
jobs:
7+
build:
8+
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
python-version: ['3.11']
14+
15+
name: Linting
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
architecture: x64
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
python -m pip install -r linting.txt
27+
sudo yarn --cwd CTFd/themes/admin install --non-interactive
28+
sudo yarn global add prettier@^3.2.5
29+
30+
- name: Lint
31+
run: make lint
32+
env:
33+
TESTING_DATABASE_URL: 'sqlite://'
34+
35+
- name: Lint Dockerfile
36+
uses: brpaz/hadolint-action@master
37+
with:
38+
dockerfile: "Dockerfile"
39+
40+
- name: Lint docker-compose
41+
run: |
42+
docker compose -f docker-compose.yml config
43+
44+
- name: Lint translations
45+
run: |
46+
make translations-lint
47+

Diff for: .github/workflows/mariadb.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: CTFd MariaDB CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
services:
17+
mariadb:
18+
image: mariadb:10.11
19+
env:
20+
MYSQL_ROOT_PASSWORD: password
21+
MYSQL_DATABASE: ctfd
22+
ports:
23+
- 3306
24+
redis:
25+
image: redis
26+
ports:
27+
- 6379:6379
28+
29+
strategy:
30+
matrix:
31+
python-version: ['3.11']
32+
33+
name: Python ${{ matrix.python-version }}
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Setup python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
architecture: x64
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install -r development.txt
45+
sudo yarn install --non-interactive
46+
47+
- name: Test
48+
run: |
49+
sudo rm -f /etc/boto.cfg
50+
make test
51+
env:
52+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
53+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
54+
TESTING_DATABASE_URL: mysql+pymysql://root:password@localhost:${{ job.services.mariadb.ports[3306] }}/ctfd
55+
56+
- name: Codecov
57+
uses: codecov/codecov-action@v4
58+
with:
59+
file: ./coverage.xml

Diff for: .github/workflows/mysql.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: CTFd MySQL CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
services:
17+
mysql:
18+
image: mysql:5.7
19+
env:
20+
MYSQL_ROOT_PASSWORD: password
21+
ports:
22+
- 3306
23+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
24+
redis:
25+
image: redis
26+
ports:
27+
- 6379:6379
28+
29+
strategy:
30+
matrix:
31+
python-version: ['3.11']
32+
33+
name: Python ${{ matrix.python-version }}
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Setup python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
architecture: x64
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install -r development.txt
45+
sudo yarn install --non-interactive
46+
47+
- name: Test
48+
run: |
49+
sudo rm -f /etc/boto.cfg
50+
make test
51+
env:
52+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
53+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
54+
TESTING_DATABASE_URL: mysql+pymysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/ctfd
55+
56+
- name: Codecov
57+
uses: codecov/codecov-action@v4
58+
with:
59+
file: ./coverage.xml

Diff for: .github/workflows/mysql8.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
name: CTFd MySQL 8.0 CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
services:
17+
mysql:
18+
image: mysql:8.0
19+
env:
20+
MYSQL_ROOT_PASSWORD: password
21+
ports:
22+
- 3306
23+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
24+
redis:
25+
image: redis
26+
ports:
27+
- 6379:6379
28+
29+
strategy:
30+
matrix:
31+
python-version: ['3.11']
32+
33+
name: Python ${{ matrix.python-version }}
34+
steps:
35+
- uses: actions/checkout@v2
36+
- name: Setup python
37+
uses: actions/setup-python@v2
38+
with:
39+
python-version: ${{ matrix.python-version }}
40+
architecture: x64
41+
- name: Install dependencies
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install -r development.txt
45+
sudo yarn install --non-interactive
46+
47+
- name: Test
48+
run: |
49+
sudo rm -f /etc/boto.cfg
50+
make test
51+
env:
52+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
53+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
54+
TESTING_DATABASE_URL: mysql+pymysql://root:password@localhost:${{ job.services.mysql.ports[3306] }}/ctfd
55+
56+
- name: Codecov
57+
uses: codecov/codecov-action@v4
58+
with:
59+
file: ./coverage.xml

Diff for: .github/workflows/postgres.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
---
2+
name: CTFd Postgres CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
services:
17+
postgres:
18+
image: postgres
19+
ports:
20+
- 5432:5432
21+
env:
22+
POSTGRES_HOST_AUTH_METHOD: trust
23+
POSTGRES_DB: ctfd
24+
POSTGRES_PASSWORD: password
25+
# Set health checks to wait until postgres has started
26+
options: >-
27+
--health-cmd pg_isready
28+
--health-interval 10s
29+
--health-timeout 5s
30+
--health-retries 5
31+
redis:
32+
image: redis
33+
ports:
34+
- 6379:6379
35+
36+
strategy:
37+
matrix:
38+
python-version: ['3.11']
39+
40+
name: Python ${{ matrix.python-version }}
41+
steps:
42+
- uses: actions/checkout@v2
43+
- name: Setup python
44+
uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
architecture: x64
48+
- name: Install dependencies
49+
run: |
50+
python -m pip install --upgrade pip
51+
python -m pip install -r development.txt
52+
sudo yarn install --non-interactive
53+
54+
- name: Test
55+
run: |
56+
sudo rm -f /etc/boto.cfg
57+
make test
58+
env:
59+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
60+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
61+
TESTING_DATABASE_URL: postgres://postgres:password@localhost:${{ job.services.postgres.ports[5432] }}/ctfd
62+
63+
- name: Codecov
64+
uses: codecov/codecov-action@v4
65+
with:
66+
file: ./coverage.xml
67+

Diff for: .github/workflows/sqlite.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: CTFd SQLite CI
3+
4+
on:
5+
push:
6+
branches:
7+
- master
8+
pull_request:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
python-version: ['3.11']
20+
21+
name: Python ${{ matrix.python-version }}
22+
steps:
23+
- uses: actions/checkout@v2
24+
- name: Setup python
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
architecture: x64
29+
- name: Install dependencies
30+
run: |
31+
python -m pip install --upgrade pip
32+
python -m pip install -r development.txt
33+
sudo yarn install --non-interactive
34+
sudo yarn global add [email protected]
35+
36+
- name: Test
37+
run: |
38+
sudo rm -f /etc/boto.cfg
39+
make test
40+
env:
41+
AWS_ACCESS_KEY_ID: AKIAIOSFODNN7EXAMPLE
42+
AWS_SECRET_ACCESS_KEY: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
43+
TESTING_DATABASE_URL: 'sqlite://'
44+
45+
- name: Codecov
46+
uses: codecov/codecov-action@v4
47+
with:
48+
file: ./coverage.xml
49+

Diff for: .prettierignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
CTFd/themes/**/vendor/
2+
CTFd/themes/core/
23
CTFd/themes/core-beta/**/*
4+
CTFd/themes/admin/static/**/*
35
*.html
46
*.njk
57
*.png

0 commit comments

Comments
 (0)