github workflows: fix missing tests workflow #46
This file contains hidden or 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
| name: Tests | |
| on: | |
| push: | |
| branches: [master, dev] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test-features: | |
| name: Run build check for all features | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install just | |
| - name: Update rust | |
| run: rustup update | |
| - name: Install cargo hack | |
| run: cargo install cargo-hack | |
| - name: Build all features | |
| run: just cargo-hack | |
| tests: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt update | |
| sudo apt install python3-pip python3-virtualenv just | |
| - name: Update rust | |
| run: rustup update | |
| - name: Get admin permissions for tc | |
| run: sudo setcap cap_net_admin+ep /usr/sbin/tc | |
| - name: Create virtualenv | |
| run: virtualenv venv | |
| - name: Install python packages | |
| run: | | |
| source venv/bin/activate | |
| pip install behave psutil | |
| - name: Run tests | |
| run: | | |
| source venv/bin/activate | |
| just test |