name: CI on: [push, pull_request] jobs: test: name: Test runs-on: ${{ matrix.os }} strategy: matrix: build: [stable, beta, nightly] include: - build: stable os: ubuntu-latest rust: stable - build: beta os: ubuntu-latest rust: beta - build: nightly os: ubuntu-latest rust: nightly steps: - uses: actions/checkout@master - name: Install Rust (rustup) run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} shell: bash - run: cargo build --examples -v --workspace - run: cargo doc -v --workspace - run: cargo test -v --workspace - run: cargo clean rustfmt: name: Rustfmt runs-on: ubuntu-latest steps: - uses: actions/checkout@master - name: Install Rust run: rustup update stable && rustup default stable && rustup component add rustfmt - run: cargo fmt -- --check check: name: Check runs-on: ubuntu-latest steps: - uses: actions/checkout@master - uses: hustcer/setup-nu@v2.1 with: check-latest: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | echo "Nushell version: $(nu -c '(version).version')" for i in tests/snapshots/*.nu; do nu -c "print -n $'(ansi green)Checking $i ...'; ansi reset; source $i"; done shell: bash