Skip to content

add github test workflow #1

add github test workflow

add github test workflow #1

Workflow file for this run

name: test
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
# This action cleans up previously running instances of a workflow on the same branch. This accomplishes
# the task of automatically cancelling CI runs on pushes to the same branch, which is a common feature in
# most CI systems but currently not possible with GitHub actions.
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up cargo cache
uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose