This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 503
53 lines (50 loc) · 2.24 KB
/
python-app.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# This workflow will install Python dependencies, run tests and lint with a single version of Python.
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Runestone Server Tests
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
docker_build:
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
SERVER_CONFIG: test
steps:
- uses: actions/checkout@v3
with:
path: RunestoneServer
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Build container
id: docker-build
run: |
cd RunestoneServer
python3 docker/docker_tools.py init
docker-tools build --single-dev --clone-all RunestoneInteractive
- name: Start container
id: docker-up
run: |
cd RunestoneServer
docker compose up -d
docker compose logs --follow &
# Wait for the container to start and create a basic venv before running docker tools inside it.
sleep 5
# Invoke this directly, since the ``docker-tools`` script isn't installed yet. After this finishes, the docker tools are installed.
docker compose exec runestone bash -c "\$RUNESTONE_PATH/.venv/bin/python \$RUNESTONE_PATH/docker/docker_tools.py wait"
- name: Test
id: pytest
run: |
cd RunestoneServer
# See if the webserver is running. Wait for the server to start.
sleep 5
echo "Checking if site is up..."
curl --silent --location 127.0.0.1 | grep "About Runestone"
# Test just the Runestone server.
docker-tools test --rs -- --skip_w3_validate