assets: add source files for ads #119
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
name: enochecker_test | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: self-hosted | |
env: | |
ENOCHECKER_TEST_CHECKER_ADDRESS: localhost | |
ENOCHECKER_TEST_CHECKER_PORT: 19145 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install enochecker_test | |
run: | | |
apt install -y python3-virtualenv | |
virtualenv -p python3 venv | |
source venv/bin/activate | |
pip install git+https://github.com/RTUnreal/enochecker_test.git@optional_utf8 | |
- name: start service | |
run: | | |
cd service | |
docker compose -p onlyflags up --build --force-recreate --renew-anon-volumes -d | |
- name: start checker | |
run: | | |
cd checker | |
docker compose -p onlyflags-checker up --build --force-recreate --renew-anon-volumes -d | |
- name: obtain Docker host IP | |
run: | | |
echo "ENOCHECKER_TEST_SERVICE_ADDRESS=$(ip -4 address show dev eth0 | grep inet | awk '{ print $2 }' | sed 's|/.*$||')" >> $GITHUB_ENV | |
- name: run enochecker_test | |
run: | | |
sleep 15 # avoid race conditions where the checks start before the service is ready | |
source venv/bin/activate | |
enochecker_test --skip-non-eno-flags | |
- name: Dump docker logs on failure | |
if: failure() | |
uses: jwalton/gh-docker-logs@v1 | |
with: | |
dest: './logs' | |
- name: Tar logs | |
if: failure() | |
run: tar cvzf ./logs.tgz ./logs | |
- name: Upload logs to GitHub | |
if: failure() | |
uses: actions/upload-artifact@master | |
with: | |
name: logs.tgz | |
path: ./logs.tgz | |
- name: Kill docker containers | |
if: failure() || success() | |
run: | | |
(cd service && docker-compose kill) | |
(cd checker && docker-compose kill) |