-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add integration tests in github actions
- Loading branch information
yngrtc
committed
Feb 11, 2024
1 parent
cf3746c
commit 8efd083
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: tests | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
branches: [master] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Run server | ||
run: cargo run --release --package sfu --example chat -- -d --level info > sfu.log 2>&1 & echo $! > server_pid.txt | ||
|
||
- name: Run tests | ||
run: cargo test --release -- --show-output > test.log 2>&1 | ||
|
||
- name: Shutdown server | ||
run: kill -INT $(cat server_pid.txt) || true | ||
|
||
- name: Upload logs as artifact | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: logs | ||
path: | | ||
sfu.log | ||
test.log |