Skip to content

Merge pull request #121 from Takashicc/tagpr-from-v1.1.0 #373

Merge pull request #121 from Takashicc/tagpr-from-v1.1.0

Merge pull request #121 from Takashicc/tagpr-from-v1.1.0 #373

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
paths:
- .github/workflows/ci.yml
- src/**
- .dockerignore
- Cargo.lock
- Cargo.toml
- Dockerfile
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "-Dwarnings"
jobs:
before-build-checks:
name: Before build checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Format
run: cargo fmt --all --check --verbose
- name: Clippy
run: cargo clippy --all-targets --all-features
- name: Check packages
run: cargo check --locked --verbose
- name: Test
run: cargo test --verbose
build:
needs: before-build-checks
name: Build
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: read
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: docker/setup-buildx-action@6524bf65af31da8d45b59e8c27de4bd072b392f5 # v3
- uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
with:
push: false
file: Dockerfile
tags: takashicc/slack-approval:latest
cache-from: type=gha
cache-to: type=gha,mode=max