feat: add CI checks #2
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: CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Run tests | |
run: cargo test -- --nocapture | |
- name: Generate code | |
run: cargo run -p codegen | |
- name: Run tests | |
env: | |
PERSONAL_ACCESS_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
GH_APP_ID: ${{ secrets.GH_APP_ID }} | |
GH_APP_PRIVATE_KEY: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
run: | | |
private_key_path=$(mktemp) | |
echo $GITHUB_APP_PRIVATE_KEY | base64 --decode > $private_key_path | |
export GITHUB_APP_ID=$GH_APP_ID | |
export GITHUB_APP_PRIVATE_KEY_PATH=$private_key_path | |
cargo test --features="apps repos users pulls issues search" --examples -- --nocapture |