Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat(ci): introduce base GH Actions Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * test(broken) Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(ci): use proper branch names Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(clippy): run once only Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(clippy): only run once Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(clippy): run at least once Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * chore(readme): update test status badge Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * test pre-commit using github actions * add stable and 1.47 rust to test * fixed toolchain proper matrix toolchain * upgrade pre-commit * install rustfmt * add max-parallel to allow to complete both items in matrix * use order to enforce to test 1.47 first * disable latest 1.48 clippy checks * remove 1.47.0 as we need to use 1.48 clippy checks * run clippy on all targets and fixed clippy issues in example * fix(pre-commit): remove clippy and format Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * fix(badge): point at riker repo test resultss Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> * Apply suggestions from code review Co-authored-by: Rajiv Shah <rajivshah1@icloud.com> * Update .github/workflows/audit.yml Co-authored-by: Rajiv Shah <rajivshah1@icloud.com> * chore(travis): purge Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com> Co-authored-by: olexiyb <olexiyb@gmail.com> Co-authored-by: Rajiv Shah <rajivshah1@icloud.com>
- Loading branch information
1 parent
69be3d9
commit edc07d5
Showing
8 changed files
with
140 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Audit | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
push: | ||
branches: | ||
- master | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "**/Cargo.lock" | ||
- "**/Cargo.toml" | ||
|
||
jobs: | ||
audit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Build and run tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
project: [./, ./riker-macros/] | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Get current date | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV | ||
|
||
- name: Get current date | ||
if: matrix.os == 'windows-latest' | ||
run: echo "CURRENT_DATE=$(Get-Date -Format "yyyy-MM-dd")" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 | ||
|
||
- name: Cache cargo registry | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/registry | ||
# Add date to the cache to keep it up to date | ||
key: ${{ matrix.project }}-${{ matrix.os }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} | ||
# Restore from outdated cache for speed | ||
restore-keys: | | ||
${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-registry-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Cache cargo index | ||
uses: actions/cache@v2 | ||
with: | ||
path: ~/.cargo/git | ||
# Add date to the cache to keep it up to date | ||
key: ${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} | ||
# Restore from outdated cache for speed | ||
restore-keys: | | ||
${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-index-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Cache cargo target | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ matrix.project}}/target | ||
# Add date to the cache to keep it up to date | ||
key: ${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }}-${{ env.CURRENT_DATE }} | ||
# Restore from outdated cache for speed | ||
restore-keys: | | ||
${{ matrix.project }}-${{ matrix.os }}-${{ matrix.rust }}-cargo-build-target-${{ hashFiles('**/Cargo.toml') }} | ||
- name: Build ${{ matrix.project }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --manifest-path=${{ matrix.project }}Cargo.toml --all --release | ||
|
||
- name: Run tests for ${{ matrix.project }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: --manifest-path=${{ matrix.project }}Cargo.toml --all --release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: pre-commit | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
matrix: | ||
rust: | ||
- stable | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: clippy, rustfmt | ||
- uses: pre-commit/action@v2.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters