Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
26211c6
feat: Run datatracker test suite for PRs
larseggert Mar 16, 2022
0cd1d55
Fixes
larseggert Mar 16, 2022
26fbaeb
Fixes
larseggert Mar 16, 2022
c2ba776
No need to build with compose
larseggert Mar 16, 2022
591c64b
Fixes
larseggert Mar 16, 2022
69fb344
Fix syntax
larseggert Mar 16, 2022
565f21f
Fix syntax
larseggert Mar 16, 2022
4039ed1
-T
larseggert Mar 16, 2022
97b4751
Pass the error code upwards
larseggert Mar 16, 2022
5f5a60f
Also run on PRs
larseggert Mar 16, 2022
2ec3e53
Don't trigger on push
larseggert Mar 16, 2022
9f399cc
ci: use base test docker image + use actions services
NGPixel Mar 17, 2022
bdc9477
ci: disable mariadb service during tests
NGPixel Mar 17, 2022
4f8261b
ci: use default checkout path for tests
NGPixel Mar 17, 2022
1b69cfd
ci: add prepare steps to tests workflow
NGPixel Mar 17, 2022
570cd68
ci: try test build with sudo
NGPixel Mar 17, 2022
30797ba
ci: test workflow - attempt creating dist dirs beforehand
NGPixel Mar 17, 2022
ea6485a
ci: tests workflow - try chmod workspace
NGPixel Mar 17, 2022
720e076
ci: tests workflow - copy settings_local config
NGPixel Mar 17, 2022
b409991
ci: tests workflow - remove django check
NGPixel Mar 17, 2022
2f47ea7
ci: tests workflow - call app-create-dirs.sh
NGPixel Mar 17, 2022
8632641
ci: tests workflow - do migrate before tests
NGPixel Mar 17, 2022
f80406c
ci: tests workflow - use settings_sqlitetest config
NGPixel Mar 17, 2022
82da647
ci: tests workflow - add some verbose
NGPixel Mar 17, 2022
5efc7ed
ci: tests workflow - remove checks
NGPixel Mar 17, 2022
b580308
ci: tests workflow - enable mariadb service container
NGPixel Mar 17, 2022
c8b6b9b
ci: tests workflow - disable wait-for script
NGPixel Mar 17, 2022
1662ff9
ci: tests workflow - remove db port mapping
NGPixel Mar 17, 2022
7141b67
Update ci-run-tests.yml
NGPixel Mar 19, 2022
9eb38fc
Update ci-run-tests.yml
NGPixel Mar 19, 2022
214bcb7
Update ci-run-tests.yml
NGPixel Mar 19, 2022
09d0691
Update ci-run-tests.yml
NGPixel Mar 19, 2022
e7b1a01
Update ci-run-tests.yml
NGPixel Mar 19, 2022
1bd17df
Update ci-run-tests.yml
NGPixel Mar 19, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions .github/workflows/ci-run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Run All Tests

on:
pull_request:
branches:
# TEMPORARY: Replace with main once bs5 is merged
- 'feat/bs5'

jobs:
tests:
name: Run Tests
runs-on: ubuntu-latest
container: ghcr.io/ietf-tools/datatracker-test-base:latest

services:
db:
image: ghcr.io/ietf-tools/datatracker-db:latest
volumes:
- mariadb-data:/var/lib/mysql
env:
MYSQL_ROOT_PASSWORD: ietf
MYSQL_DATABASE: ietf_utf8
MYSQL_USER: django
MYSQL_PASSWORD: RkTkDPFnKpko

steps:
- uses: actions/checkout@v3

- name: Prepare for tests
run: |
echo "Running containers:"
docker ps -a
echo "Fixing permissions..."
chmod -R 777 ./
echo "Copying docker config files..."
cp ./docker/configs/settings_local.py ./ietf/settings_local.py
cp ./docker/configs/settings_local_sqlitetest.py ./ietf/settings_local_sqlitetest.py
echo "Installing NPM packages..."
npm install --prefer-offline --no-audit
echo "Building static assets..."
npx parcel build
echo "Creating data directories..."
chmod +x ./docker/scripts/app-create-dirs.sh
./docker/scripts/app-create-dirs.sh

- name: Ensure DB is ready
run: |
/usr/local/bin/wait-for db:3306 -- echo "DB ready"

- name: Run all tests
run: |
echo "Running checks..."
./ietf/manage.py check --settings=settings_local
echo "Running tests..."
./ietf/manage.py test --settings=settings_local_sqlitetest --failfast
3 changes: 3 additions & 0 deletions docker/scripts/app-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ echo "Running initial checks..."
echo "Done!"

if [ -z "$EDITOR_VSCODE" ]; then
CODE=0
python -m smtpd -n -c DebuggingServer localhost:2025 &
if [ -z "$*" ]; then
echo
Expand All @@ -112,6 +113,8 @@ if [ -z "$EDITOR_VSCODE" ]; then
echo "Executing \"$*\" and stopping container."
echo
bash -c "$*"
CODE=$?
fi
service rsyslog stop
exit $CODE
fi