Do dummy reads because still fails #9
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 for golang unit testing | |
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: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- name: Install Go deps | |
run: go get . | |
- name: Build gocanopen | |
run: go build -v ./... | |
- name: Run gocanopen unit tests | |
run: | | |
~/vcan/virtualcan --port 18888 & | |
go test -v ./... | |