update crates #383
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: | |
pull_request: | |
workflow_dispatch: | |
# schedule: | |
# - cron: '0 * * * *' | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
# - name: Setup Pages | |
# uses: actions/configure-pages@v2 | |
- name: Update rust | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
rustup update | |
- name: Compile application | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
rustc --version | |
cargo --version | |
cargo build | |
cargo test | |
- name: Run cargo fmt --check | |
run: cargo fmt --check | |
- name: Run clippy | |
run: cargo clippy -- --deny warnings | |
- name: Download database dump | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
cargo run --bin download-db-dump | |
- name: Download crates | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
mkdir -p temp | |
cargo run --bin download-crates -- --limit 10 | |
- name: Analyze crates | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
mkdir -p temp | |
cargo run --bin analyze-crates | |
- name: Create pages | |
if: ${{ github.event_name != 'pull_request' }} | |
run: | | |
cargo run --bin html | |
# - name: Show results | |
# if: ${{ github.event_name != 'pull_request' }} | |
# run: | | |
# tree _site | |
# | |
# | |
# - name: Upload artifact | |
# if: github.ref == 'refs/heads/main' | |
# uses: actions/upload-pages-artifact@v1 | |
# Deployment job | |
# deploy: | |
# if: github.ref == 'refs/heads/main' | |
# environment: | |
# name: github-pages | |
# url: ${{ steps.deployment.outputs.page_url }} | |
# runs-on: ubuntu-latest | |
# needs: generate | |
# steps: | |
# - name: Deploy to GitHub Pages | |
# id: deployment | |
# uses: actions/deploy-pages@v1 | |