Skip to content

Commit

Permalink
fix: CI tests with correct ports
Browse files Browse the repository at this point in the history
  • Loading branch information
simonkowallik committed Dec 29, 2024
1 parent d735dec commit 76ab43c
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 6 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/scheduled-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Scheduled Test Build

on:
workflow_dispatch:
schedule:
- cron: '5 5 */14 * *'
permissions:
contents: write
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Trigger another workflow
uses: peter-evans/repository-dispatch@v3
with:
event-type: start-scheduled-test
12 changes: 6 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
push:
branches:
- "main"
schedule:
- cron: '12 6 3 * *'
repository_dispatch:
types: [start-scheduled-test]

jobs:
build:
Expand All @@ -31,7 +31,7 @@ jobs:

- name: Install jd
run: |
go install github.com/josephburnett/jd@v1.8.1
go install github.com/josephburnett/jd@v1.9.1
echo "$HOME/go/bin" >> $GITHUB_PATH
- name: Set up QEMU
Expand Down Expand Up @@ -68,14 +68,14 @@ jobs:
- name: Start apiserver in background
if: ${{ matrix.containers.file == 'files/Dockerfile.apiserver' }}
run: |
docker run --rm -p 8888:80 -d \
docker run --rm -p 8000:8000 -d \
irulescan:apiserver
sleep 10
- name: Run apiserver scanfiles test
if: ${{ matrix.containers.file == 'files/Dockerfile.apiserver' }}
run: |
curl -s http://localhost:8888/scanfiles/ \
curl -s http://localhost:8000/scanfiles/ \
-F 'file=@tests/basic/ok.tcl' \
-F 'file=@tests/basic/warning.tcl' \
-F 'file=@tests/basic/dangerous.tcl' > output.json
Expand All @@ -84,6 +84,6 @@ jobs:
- name: Run apiserver scan test
if: ${{ matrix.containers.file == 'files/Dockerfile.apiserver' }}
run: |
curl -s http://localhost:8888/scan/ \
curl -s http://localhost:8000/scan/ \
--data-binary '@tests/basic/dangerous.tcl' > output.json
jd -mset output.json tests/basic/dangerous.tcl.stdin.json || exit 1

0 comments on commit 76ab43c

Please sign in to comment.