Tests #232
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
on: | |
# Test on PRs for any branch | |
pull_request: | |
branches: | |
- '*' | |
# Test only pushes to master branch | |
push: | |
branches: | |
- master | |
schedule: | |
- cron: '0 0 * * 0' # Midnight of each sunday | |
name: Tests | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
name: Test Suite | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
- nightly | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Install toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Run cargo test | |
env: | |
API_KEY: ${{secrets.HIBP_TEST_KEY}} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test |