fix(deps): update rust crate tokio to v1.43.0 #370
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: | |
branches: | |
- main | |
pull_request: | |
merge_group: | |
env: | |
LATEST_TAG: thetayloredman/intersection:latest | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: Install Rust problem matchers | |
uses: r7kamura/rust-problem-matchers@v1 | |
- name: cargo +nightly fmt --check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
components: clippy | |
- name: Install Rust problem matchers | |
uses: r7kamura/rust-problem-matchers@v1 | |
- name: Use dependency cache | |
uses: Swatinem/rust-cache@v2 | |
- name: cargo +nightly clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install Rust problem matchers | |
uses: r7kamura/rust-problem-matchers@v1 | |
- name: Use dependency cache | |
uses: Swatinem/rust-cache@v2 | |
- name: cargo test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Install Rust problem matchers | |
uses: r7kamura/rust-problem-matchers@v1 | |
- name: Use dependency cache | |
uses: Swatinem/rust-cache@v2 | |
- name: cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
build_docker_image: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
needs: [test, check] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
# Make sure the actual branch is checked out when running on pull requests | |
ref: ${{ github.head_ref }} | |
repository: ${{github.event.pull_request.head.repo.full_name || github.repository }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ env.LATEST_TAG }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max |