Added sleep at the end of SDO test, waiting for PR #6
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
name: Test runner | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
env: | |
VIRTUALCAN_SERVER_BIN: ${{ github.workspace }}/vcan/virtualcan | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Cache rust modules | |
id: cache-rust | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Install minimal stable with clippy and rustfmt | |
if: steps.cache-rust.outputs.cache-hit != 'true' | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Checkout virtualcan | |
uses: actions/checkout@v3 | |
with: | |
repository: windelbouwman/virtualcan | |
ref: refs/heads/master | |
path: virtualcan | |
- name: Cache vcan | |
id: cache-vcan | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/vcan | |
key: ${{ runner.os }}-vcan | |
- name: Build virtualcan | |
if: steps.cache-vcan.outputs.cache-hit != 'true' | |
run: | | |
cd ./virtualcan/rust/server | |
cargo build --release | |
mkdir ~/vcan | |
mv ../target/release/virtualcan ~/vcan | |
- name: Install python deps | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
cache-dependency-path: | | |
./virtualcan/python/setup.py | |
**/requirements*.txt | |
- run: | | |
pip install -r ./requirements.txt | |
pip install ./virtualcan/python | |
- name: Run python integration tests | |
run: | | |
nohup ~/vcan/virtualcan --port 18889 & | |
nohup go run ./cmd/canopen_test -p ./testdata/base.eds & | |
sleep 15 | |
python -m pytest ./tests/test_sdo.py -v | |
python -m pytest ./tests/test_pdo.py -v | |