chore: update ci conditions #10
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@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 }} | |
run: | | |
export GITHUB_PERSONAL_ACCESS_TOKEN=$PERSONAL_ACCESS_TOKEN | |
cargo test --features="repos users pulls issues search" --examples -- --nocapture |