build: enable cloning private repos #23
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
name: ci-rust-push | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'master' | |
jobs: | |
skip-duplicates: | |
runs-on: ubuntu-latest | |
outputs: | |
should_skip: ${{ steps.skip_check.outputs.should_skip }} | |
steps: | |
- id: skip_check | |
uses: fkirc/skip-duplicate-actions@v5 | |
with: | |
concurrent_skipping: "same_content_newer" | |
debug: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo $GITHUB_WORKSPACE | |
shell: bash | |
- run: echo $INPUT_REPOSITORY | |
shell: bash | |
- run: echo $INPUT_PATH | |
shell: bash | |
- run: echo $INPUT_REF | |
shell: bash | |
- run: env | |
shell: bash | |
check: | |
needs: skip-duplicates | |
if: needs.skip-duplicates.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read != '' }} | |
with: | |
token: ${{ env.ci_read }} | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read == '' }} | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/actions/rust-toolchain | |
with: | |
token: ${{ secrets.CI_READ }} | |
- run: cargo check --all-features | |
test: | |
needs: skip-duplicates | |
if: needs.skip-duplicates.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read != '' }} | |
with: | |
token: ${{ env.ci_read }} | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read == '' }} | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/actions/rust-toolchain | |
with: | |
token: ${{ secrets.CI_READ }} | |
- run: cargo test --all-features | |
fmt: | |
needs: skip-duplicates | |
if: needs.skip-duplicates.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read != '' }} | |
with: | |
token: ${{ env.ci_read }} | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read == '' }} | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/actions/rust-toolchain | |
with: | |
token: ${{ secrets.CI_READ }} | |
toolchain: nightly | |
- run: rustup component add rustfmt | |
- run: cargo fmt --all --check | |
clippy: | |
needs: skip-duplicates | |
if: needs.skip-duplicates.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read != '' }} | |
with: | |
token: ${{ env.ci_read }} | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read == '' }} | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/actions/rust-toolchain | |
with: | |
token: ${{ secrets.CI_READ }} | |
- run: rustup component add clippy | |
- run: cargo clippy --all-features -- --deny warnings | |
doc: | |
needs: skip-duplicates | |
if: needs.skip-duplicates.outputs.should_skip != 'true' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read != '' }} | |
with: | |
token: ${{ env.ci_read }} | |
submodules: recursive | |
- uses: actions/checkout@v3 | |
env: | |
ci_read: ${{ secrets.CI_READ }} | |
if: ${{ env.ci_read == '' }} | |
with: | |
submodules: recursive | |
- uses: ./.github/workflows/actions/rust-toolchain | |
with: | |
token: ${{ secrets.CI_READ }} | |
- run: cargo doc --all-features --no-deps |