33 lines
669 B
YAML
33 lines
669 B
YAML
name: Rust Library Test
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: docker
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
run: |
|
|
docker run --rm \
|
|
-v ${PWD}:/workspace \
|
|
-w /workspace \
|
|
alpine/git clone $CI_REPOSITORY_URL .
|
|
|
|
- name: Set up Rust
|
|
run: |
|
|
docker run --rm \
|
|
-v ${PWD}:/workspace \
|
|
-w /workspace \
|
|
rust:latest \
|
|
sh -c "rustup update"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
docker run --rm \
|
|
-v ${PWD}:/workspace \
|
|
-w /workspace \
|
|
rust:latest \
|
|
sh -c "cargo test --lib"
|
|
|