Fix installation token not impl ExpirableToken
(#49)
#100
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 | |
on: | |
push: | |
branches: [main] | |
pull_request_target: | |
branches: [main] | |
types: | |
- opened | |
- synchronize | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Check spelling | |
run: | | |
if ! which typos > /dev/null; then | |
cargo install typos-cli | |
fi | |
typos | |
- name: Generate code | |
run: cargo run -p codegen | |
- name: Check formatting | |
run: cargo fmt --check | |
- name: Check linting | |
run: cargo clippy | |
- name: Run tests | |
env: | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
GITHUB_APP_ID: ${{ secrets.GH_APP_ID }} | |
run: | | |
private_key_path=$(mktemp) | |
echo "${{ secrets.GH_APP_PRIVATE_KEY }}" | base64 --decode > $private_key_path | |
export GITHUB_APP_PRIVATE_KEY_PATH=$private_key_path | |
cargo test --all-features -- --nocapture |