Skip to content

Commit

Permalink
Update rust-library.yaml managed Github Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
bitdriftlabs-terraform[bot] committed Oct 3, 2023
1 parent 43c1d02 commit 8623b26
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/rust-library.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Managed by infra via Terraform, edits will be lost
name: rust-library
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
test:
name: rust
runs-on: ubuntu-latest-8-cores
if: github.actor != 'lyft-lhouse-terraform[bot]'
strategy:
matrix:
rust: ['stable']
steps:
- name: Checkout
uses: actions/checkout@v3

# Get a token that can be used for org read-only clones.
- name: org-read-only-install token
id: org-read-only
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.ORG_READ_ONLY_APP_ID }}
private_key: ${{ secrets.ORG_READ_ONLY_APP_PRIVATE_KEY }}

# Install the token so all ssh pulls are rewritten to use the token from the previous step.
- name: setup git credentials
uses: de-vri-es/setup-git-credentials@v2
with:
credentials: https://x-access-token:${{ steps.org-read-only.outputs.token }}@github.com/

- name: Rust Toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
profile: minimal

- name: Cache
uses: Swatinem/rust-cache@dd05243424bd5c0e585e4b55eb2d7615cdd32f1f

- name: CI Setup
run: if [[ -f ci/setup.sh ]]; then ci/setup.sh; fi

- name: Build Workspace
run: cargo build --workspace

- name: Test Workspace
run: |
if test -f "Makefile"; then
make test
else
cargo test --workspace
fi

0 comments on commit 8623b26

Please sign in to comment.