Skip to content

Commit

Permalink
ci: add test workflow, update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
roosta committed Nov 11, 2023
1 parent a80e19b commit b8dcbe8
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 3 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: 'test'
on:
push:
branches:
- refactor/wm_properties

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install test dependencies
run: sudo apt-get install -y i3-wm gcc gpick xterm

- name: Run tests
uses: coactions/setup-xvfb@v1
with:
run: |
script/test_env.sh
cargo test
2 changes: 1 addition & 1 deletion script/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
vagrant up
vagrant ssh -c "cd /vagrant; script/setup.sh; cargo clean; cargo test"
vagrant ssh -c "cd /vagrant; script/xvfb.sh; script/test_env.sh; cargo clean; cargo test"
vagrant halt
2 changes: 0 additions & 2 deletions script/setup.sh → script/test_env.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
export DISPLAY=:99.0
Xvfb :99.0 &
sleep 3
i3 -c /dev/null &
sleep 3
gpick &
Expand Down
2 changes: 2 additions & 0 deletions script/xvfb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Xvfb :99.0 &
sleep 3

0 comments on commit b8dcbe8

Please sign in to comment.