Skip to content

Fix daily wf audit and daily wf testing speed #40

Fix daily wf audit and daily wf testing speed

Fix daily wf audit and daily wf testing speed #40

Workflow file for this run

name: Daily Workflow
on:
# Run every week day at 12 PM UTC
schedule:
- cron: "0 12 * * 1-5"
push:
branches: "74-resolve-daily-workflow-error"
# Allow workflow to be triggered manually.
workflow_dispatch:
env:
BRANCH: "74-resolve-daily-workflow-error" # Temporarily use 74-resolve-daily-workflow-error to test this PR
CARGO_TERM_COLOR: always
# TODO: Include audit step within `generate-lockfile` step.
jobs:
# Generate lockfile separately so that each OS uses the same locked
# versions. Using ubuntu-latest because it is the cheapest.
generate-lockfile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
- name: Generate lockfile
run: cargo generate-lockfile -v
- name: Install cargo make
uses: davidB/rust-cargo-make@v1
with:
version: "0.36.13"
- name: Audit
run: cargo make --profile github-actions audit
- uses: actions/upload-artifact@v3
with:
name: Cargo.lock
path: Cargo.lock
intense-tests:
needs: generate-lockfile
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Install cargo make
uses: davidB/rust-cargo-make@v1
with:
version: "0.36.13"
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
- name: Test with release
run: cargo make --profile github-actions test
publish:
needs: intense-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ env.BRANCH }}
- name: Publish
uses: katyo/publish-crates@v2
with:
args: "--verbose"
dry-run: true
publish-delay: 1000 # Wait 1 second between publishing packages in this workspace in dependency order
ignore-unpublished-changes: true
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}