Skip to content

Commit

Permalink
ci: add a cargo doc job
Browse files Browse the repository at this point in the history
  • Loading branch information
dj8yf0μl committed Dec 2, 2024
1 parent da3f1f4 commit e82ffcc
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
platform: [macos-latest]
toolchain: [stable]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install Homebrew
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
Expand Down
32 changes: 27 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
rs: stable
features: ['', '--features unstable,legacy,__abi-generate']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.platform.rs }} with rustfmt, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand All @@ -45,7 +45,7 @@ jobs:
name: Clippy and fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -61,7 +61,7 @@ jobs:
name: Compilation tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -75,7 +75,7 @@ jobs:
name: Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "Setup Windows toolchain"
uses: actions-rs/toolchain@v1
with:
Expand All @@ -93,7 +93,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
Expand All @@ -105,3 +105,25 @@ jobs:
run: cargo install cargo-audit
- name: Run Audit
run: cargo audit
# there're sometimes warnings, which signal, that the generated doc
# won't look as expected, when rendered, and sometimes errors, which will prevent doc from being
# generated at release time altogether.
cargo-doc:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v4
- name: Install Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
default: true
- name: run cargo doc
env:
RUSTDOCFLAGS: -D warnings
run: |
cargo doc -p near-sdk --features unstable,legacy,unit-testing,__macro-docs
cargo doc -p near-sdk-macros
cargo doc -p near-contract-standards
cargo doc -p near-sys
2 changes: 1 addition & 1 deletion .github/workflows/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
factory-contract
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.toolchain }} with rustfmt, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_examples_small.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
test-contract,
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: "${{ matrix.toolchain }} with rustfmt, clippy, and wasm32"
uses: actions-rs/toolchain@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/typo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v2
uses: actions/checkout@v4
- name: Check spelling of the entire repository
uses: crate-ci/[email protected]

0 comments on commit e82ffcc

Please sign in to comment.