Update trigger and actions

This commit is contained in:
Valentin Brandl 2022-10-11 09:42:41 +02:00
parent d3dce34d13
commit d257ddd7fd
No known key found for this signature in database
GPG Key ID: 62E7C7F2C48DBBF2

View File

@ -1,13 +1,19 @@
on: [push, pull_request] on:
workflow_call:
push:
branches:
- master
pull_request:
schedule:
- cron: "0 0 * * *"
jobs: jobs:
rustfmt: rustfmt:
name: Rustfmt name: Rustfmt
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -17,15 +23,6 @@ jobs:
override: true override: true
components: rustfmt components: rustfmt
- name: Cache cargo registry, index and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: rustfmt-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check Formatting - name: Check Formatting
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
@ -37,7 +34,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -48,13 +45,13 @@ jobs:
components: rustfmt components: rustfmt
- name: Cache cargo registry, index and build directory - name: Cache cargo registry, index and build directory
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/registry ~/.cargo/registry
~/.cargo/git ~/.cargo/git
./target ./target
key: clippy-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Clippy Linting - name: Clippy Linting
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
@ -74,7 +71,7 @@ jobs:
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
@ -84,13 +81,13 @@ jobs:
override: true override: true
- name: Cache cargo registry, index and build directory - name: Cache cargo registry, index and build directory
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: | path: |
~/.cargo/registry ~/.cargo/registry
~/.cargo/git ~/.cargo/git
./target ./target
key: test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Tests - name: Run Tests
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1