fork of https://github.com/tree-sitter/tree-sitter-graph
1name: Continuous integration 2on: 3 push: 4 branches: [main] 5 pull_request: 6 schedule: 7 - cron: "0 0 1,15 * *" 8 9jobs: 10 test: 11 runs-on: ${{ matrix.os }} 12 strategy: 13 matrix: 14 os: [ubuntu-latest] 15 rust: [stable] 16 17 steps: 18 - name: Install Rust environment 19 uses: hecrj/setup-rust-action@v1 20 with: 21 rust-version: ${{ matrix.rust }} 22 - name: Install Cargo plugins 23 run: | 24 rustup toolchain install nightly 25 cargo install cargo-hack cargo-minimal-versions 26 - name: Checkout code 27 uses: actions/checkout@v2 28 - name: Check formatting 29 run: cargo fmt --all -- --check 30 - name: Cache dependencies 31 uses: actions/cache@v2 32 with: 33 path: | 34 ~/.cargo/registry 35 ~/.cargo/git 36 target 37 key: ${{ runner.OS }}-cargo-${{ hashFiles('**/Cargo.lock') }} 38 restore-keys: | 39 ${{ runner.OS }}-cargo- 40 - name: Build library (all feature combinations) 41 run: cargo hack --feature-powerset --no-dev-deps build 42 - name: Test library (all feature combinations) 43 run: cargo hack --feature-powerset test 44 - name: Build library (minimal versions) 45 run: cargo minimal-versions build