Skip to content

deps: Bump the deno group with 6 updates #1380

deps: Bump the deno group with 6 updates

deps: Bump the deno group with 6 updates #1380

Workflow file for this run

name: Continuous integration
on:
pull_request:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 2 # Fail cache download after 2 minutes.
jobs:
build:
name: Build on ${{ matrix.target }}
strategy:
matrix:
include:
- target: x86_64-apple-darwin
os: macos-14
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false # caching requires a go.sum file, which we don't have in our project
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # v1
with:
toolchain: 1.77
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
shared-key: ${{ matrix.target }}
# Always save the build artifacts to the cache to speed up builds of additional
# commits added to an already-opened pull request.
# save-if: ${{ github.ref == 'refs/heads/main' }}
- run: cargo build --workspace --all-features --all-targets --target=${{ matrix.target }}
test:
name: Test on ${{ matrix.target }}
runs-on: ${{ matrix.os }}
needs:
- build
strategy:
fail-fast: false
matrix:
include:
- target: "x86_64-apple-darwin"
os: macos-latest
- target: "x86_64-pc-windows-msvc"
os: windows-latest
- target: "x86_64-unknown-linux-gnu"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false # caching requires a go.sum file, which we don't have in our project
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # v1
with:
toolchain: 1.77
target: ${{ matrix.target }}
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
shared-key: ${{ matrix.target }}
save-if: false
- name: Run all tests
run: cargo test --all-features --target=${{ matrix.target }}
# - name: Check if we compile without any features activated
# run: cargo build --package ${{ matrix.crate }} --no-default-features
#
# - name: Check if crate has been released
# id: check-released
# run: |
# RESPONSE_CODE=$(curl https://crates.io/api/v1/crates/${{ matrix.crate }} --silent --write-out "%{http_code}" --output /dev/null)
# echo "code=${RESPONSE_CODE}"
# echo "code=${RESPONSE_CODE}" >> $GITHUB_OUTPUT
#
# - name: Check public API for semver violations
# if: steps.check-released.outputs.code == 200 # Workaround until https://github.com/obi1kenobi/cargo-semver-check/issues/146 is shipped.
# run: |
# wget -q -O- https://github.com/obi1kenobi/cargo-semver-checks/releases/download/v0.17.1/cargo-semver-checks-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C ~/.cargo/bin
# cargo semver-checks check-release -p ${{ matrix.crate }}
check-rustdoc-links:
name: Check rustdoc intra-doc links
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false # caching requires a go.sum file, which we don't have in our project
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # v1
with:
toolchain: 1.77
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
shared-key: "x86_64-unknown-linux-gnu"
save-if: false
- name: Check rustdoc links
run: RUSTDOCFLAGS="--deny rustdoc::broken_intra_doc_links --deny warnings" cargo doc --verbose --workspace --no-deps --all-features --document-private-items
clippy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # v1
with:
toolchain: 1.77
components: clippy
- uses: Swatinem/rust-cache@82a92a6e8fbeee089604da2575dc567ae9ddeaab # v2.7.5
with:
shared-key: "x86_64-unknown-linux-gnu"
save-if: false
- name: Run cargo clippy
run: cargo custom-clippy # cargo alias to allow reuse of config locally
rustfmt:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false # caching requires a go.sum file, which we don't have in our project
- uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203 # v1
with:
toolchain: 1.77
components: rustfmt
- name: Check formatting
run: cargo fmt -- --check
prettier-check:
name: Check formatting (Prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actionsx/prettier@3d9f7c3fa44c9cb819e68292a328d7f4384be206 # latest
with:
# prettier CLI arguments.
args: --check .
validate_pr_title:
name: Validate PR title
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
steps:
- uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# Configure which types are allowed (newline delimited).
types: |
feat
fix
chore
docs
deps
test
ci
refactor
requireScope: false
- name: Check PR title length
env:
TITLE: ${{ github.event.pull_request.title }}
run: |
title_length=${#TITLE}
if [ $title_length -gt 72 ]
then
echo "PR title is too long (greater than 72 characters)"
exit 1
fi