Add random IA from UE #129
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: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: self-hosted | |
env: | |
ENOCHECKER_TEST_CHECKER_ADDRESS: localhost | |
ENOCHECKER_TEST_CHECKER_PORT: 3303 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: recursive | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: Install enochecker_test | |
run: | | |
python -m venv venv | |
source venv/bin/activate | |
python -m pip install --upgrade pip | |
pip install enochecker-test | |
- name: start service | |
run: | | |
cd service | |
docker-compose up --build --force-recreate -d | |
- name: start checker | |
run: | | |
cd checker | |
docker-compose up --build --force-recreate -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 | |
if: github.ref_name != 'fixed' | |
run: | | |
source venv/bin/activate | |
enochecker_test test_getflag_twice test_getnoise_twice test_getflag_wrong_flag test_getnoise test_putflag test_getnoise_twice test_getnoise test_getflag test_getflag_multiplied test_exploit_per_exploit_id test_exploit_per_flag_id test_getnoise_multiplied test_getnoise_after_second_putnoise_with_same_variant_id test_getnoise_multiplied test_putflag_multiplied test_getnoise_without_putnoise test_getnoise_without_putnoise test_putnoise_invalid_variant test_putnoise test_getflag_without_putflag test_getflag_invalid_variant test_putnoise_multiplied test_putnoise test_putflag_invalid_variant test_havoc_multiplied test_putnoise_multiplied test_exploit_invalid_variant test_havoc_invalid_variant test_getnoise_invalid_variant | |
- 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) |