This repository has been archived by the owner on Jun 30, 2024. It is now read-only.
Update README.rst #1005
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |