Skip to content

Commit

Permalink
Add basic github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
LaserEyess committed Jun 3, 2024
1 parent f655528 commit b8e3252
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: test

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: install deps
run: |
sudo apt-get update
sudo apt-get install -y meson python3 libsystemd-dev curl openssh-client
- name: meson configure
run: meson setup build -Denable_tests=true
- name: meson test
run: meson test -C build || cat ./build/meson-logs/testlog.txt
2 changes: 1 addition & 1 deletion test/test_http.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ port=10080
systemd-socket-activate -l $port $1 --protocol http --log-level DEBUG --log-to-stdout &
trap "kill -SIGTERM $!" SIGINT EXIT

timeout -s SIGINT 10 curl -v "http://localhost:${port}"
timeout -s SIGINT 10 curl -v "http://127.0.0.1:${port}"

if [[ $? -ne 124 ]]
then
Expand Down
2 changes: 1 addition & 1 deletion test/test_ssh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ port=10022
systemd-socket-activate -l $port $1 --protocol ssh --log-level DEBUG --log-to-stdout &
trap "kill -SIGTERM $!" SIGINT EXIT

timeout -s SIGINT 10 ssh -v localhost -p $port
timeout -s SIGINT 10 ssh -v 127.0.0.1 -p $port

if [[ $? -ne 124 ]]
then
Expand Down

0 comments on commit b8e3252

Please sign in to comment.