add tests for lowerbound #404
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: verify | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
verify: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Install dependencies | |
# pip3 install -U online-judge-verify-helper | |
run: pip3 install git+https://github.com/CoCo-Japan-pan/verification-helper.git@for-usage | |
- name: Set Toolchain | |
# https://github.com/dtolnay/rust-toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: 1.70.0 | |
components: rustfmt, clippy | |
- name: lint | |
run: | | |
cargo check | |
cargo fmt --all -- --check | |
cargo clippy --lib -- -D warnings | |
cargo test --all | |
- name: generate docs | |
run: | | |
cargo clean | |
cargo update | |
cargo doc --lib | |
git switch -c cargo-doc | |
rm -rf doc | |
cp -r target/doc doc | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "generate docs" | |
- name: Run tests | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
YUKICODER_TOKEN: ${{ secrets.YUKICODER_TOKEN }} | |
GH_PAT: ${{ secrets.GH_PAT }} | |
DROPBOX_REFRESH_TOKEN: ${{ secrets.DROPBOX_REFRESH_TOKEN }} | |
DROPBOX_APP_KEY: ${{ secrets.DROPBOX_APP_KEY }} | |
DROPBOX_APP_SECRET: ${{ secrets.DROPBOX_APP_SECRET }} | |
run: oj-verify all | |
- name: Upload docs | |
run: | | |
git switch gh-pages | |
rm -rf doc | |
git checkout cargo-doc -- doc | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
git add -A | |
git commit -m "upload docs" | |
git push origin gh-pages | |
git switch main |