From bfc51128d10670417a2b500c250f2170b5e522d0 Mon Sep 17 00:00:00 2001 From: Peace Warrior Date: Fri, 9 Aug 2024 20:06:39 -0700 Subject: [PATCH] add github actions to test agi --- .github/workflows/test.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..ddc88c9 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,25 @@ +on: + pull_request + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.x' + - name: Run AGI for 5s + run: | + set +e + + timeout 5s python3 strawberry.py + exit_code=$? + + if [ $exit_code -eq 124 ]; then + echo "Key Interrupt (timeout) - Success" + exit 0 + else + echo "Unexpected exit code: $exit_code" + exit 1 + fi