feat(tracing): Force sampling #151
Workflow file for this run
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: Run linting and formatting | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
# workaround: secrets cannot be directly referenced in `if` | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets | |
SECRET_ACCESS: ${{toJSON(secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY != null)}} | |
permissions: | |
contents: write | |
pull-requests: write | |
jobs: | |
lint: | |
timeout-minutes: 5 | |
runs-on: ubuntu-latest | |
steps: | |
- # get a non-default github token so that any changes are verified by CI | |
if: env.SECRET_ACCESS == 'true' | |
uses: getsentry/action-github-app-token@d4b5da6c5e37703f8c3b3e43abb5705b46e159cc # v3.0.0 | |
id: token | |
with: | |
app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }} | |
private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Install Rust Toolchain | |
run: rustup toolchain install stable --profile minimal --no-self-update | |
- name: Lint | |
run: cargo clippy --workspace --all-targets --all-features --no-deps -- -D warnings | |
- name: Format | |
run: cargo fmt | |
- name: Apply any formatting fixed files | |
# note: this runs "always" or else it's skipped when pre-commit fails | |
if: env.SECRET_ACCESS == 'true' && startsWith(github.ref, 'refs/pull') && always() | |
uses: getsentry/action-github-commit@31f6706ca1a7b9ad6d22c1b07bf3a92eabb05632 # v2.0.0 | |
with: | |
github-token: ${{ steps.token.outputs.token }} | |
message: ':hammer_and_wrench: apply pre-commit fixes' |