lapce/.github/workflows/ci.yml
Workflow config file is invalid. Please check your config file: yaml: line 31: mapping values are not allowed in this context

72 lines
1.6 KiB
YAML

on:
push:
branches:
- master
name: CI
jobs:
build:
name: Rust (${{ matrix.toolchain }}) on ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
toolchain: [ stable ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies on Ubuntu
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt-get update && sudo apt-get install cmake pkg-config libgtk-3-dev
- name: Install toolchain
uses: actions-rs/toolchain@v2
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings