Skip to content

Publish crates

Publish crates #71

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
name: library-tests
jobs:
lint:
name: Linting (rustfmt + clippy)
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install rustup components (rustfmt, clippy)
run: rustup component add rustfmt clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
test:
name: Tests
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@master
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace --all-features
# Can't run cargo test in a virtual workspace with
# --no-default-features, see:
# https://github.com/MathiasPius/yaml-validator/issues/8
#
# - run: cd yaml-validator/
# - name: Run cargo test (no default features)
# uses: actions-rs/cargo@v1
# with:
# command: test
# args: --no-default-features