KIT-ILIAS-downloader/.github/workflows/ci.yml

45 lines
963 B
YAML
Raw Normal View History

2021-01-24 17:02:12 +00:00
name: CI
on:
2021-01-24 17:03:06 +00:00
push:
branches: [ master ]
pull_request:
branches: [ master ]
2021-01-24 17:02:12 +00:00
env:
2021-01-24 17:03:06 +00:00
CARGO_TERM_COLOR: always
2021-01-24 17:02:12 +00:00
jobs:
2021-01-24 17:03:06 +00:00
build:
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
- name: Cache cargo directories
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
2021-01-24 17:02:12 +00:00
2021-01-24 17:03:06 +00:00
- name: Cache cargo target dir
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: cargo build --release --verbose
# there are currently no automated tests
- name: Run tests
run: cargo test --release --verbose