Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 5
94 changes: 94 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: ci

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: short

jobs:
test:
name: test (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: install libdbus on linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libdbus-1-dev pkg-config
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
install: true
cache: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: ensure rustfmt + clippy components
# `mise.toml` requests rust profile=default, but mise's rust backend
# may install a cached minimal toolchain. Add the components
# explicitly so `cargo fmt` and `cargo clippy` always resolve.
run: rustup component add rustfmt clippy
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.7.4
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: fmt check
if: matrix.os == 'ubuntu-latest'
run: cargo fmt --all -- --check
- name: clippy
run: cargo clippy --all-targets -- -D warnings
- name: nextest
run: cargo nextest run --all-targets
- name: docs
if: matrix.os == 'ubuntu-latest'
env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --document-private-items

deny:
name: cargo-deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
install: true
cache: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo deny check advisories bans licenses sources

msrv:
name: msrv
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: install build deps for keyring (libdbus on linux)
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libdbus-1-dev pkg-config
- uses: dtolnay/rust-toolchain@b3b07ba8b418998c39fb20f53e8b695cdcc8de1b # stable
with:
toolchain: "1.89"
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.7.4
- run: cargo check --all-features

linux-headless:
name: linux headless (no D-Bus)
runs-on: ubuntu-latest
container:
image: rust:1.89-slim
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: install build deps
run: |
apt-get update
apt-get install -y --no-install-recommends pkg-config build-essential ca-certificates libdbus-1-dev
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.7.4
- run: cargo test --tests
56 changes: 56 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: release

on:
push:
tags: ['v*']

permissions:
contents: write

jobs:
upload:
name: upload-${{ matrix.target }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: aarch64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: taiki-e/upload-rust-binary-action@d94c2c5e7a35e7d1edd0e6e3b3a4d2d9b94f4f1f # v1.22.1
with:
bin: slack-cli
target: ${{ matrix.target }}
archive: slack-cli-${{ github.ref_name }}-${{ matrix.target }}
checksum: sha256
token: ${{ secrets.GITHUB_TOKEN }}

changelog:
name: changelog
runs-on: ubuntu-latest
needs: upload
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- uses: jdx/mise-action@5083fe46898c414b2475087cc79da59e7da859e8 # v2.1.11
with:
install: true
cache: true
- run: git cliff --tag ${{ github.ref_name }} --output CHANGELOG.md
- name: upload CHANGELOG to release
uses: softprops/action-gh-release@c062e08bd532815e2082a85e87e3ef29c3e6d191 # v2.0.8
with:
files: CHANGELOG.md
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Rust
/target/
**/*.rs.bk
*.pdb

# Cargo
Cargo.lock.bak

# IDE / editor
.idea/
.vscode/
*.swp
*.swo
*~

# OS
.DS_Store
Thumbs.db

# Local env / secrets
.env
.env.local
*.local.toml

# Test outputs
/tarpaulin-report.html
/coverage/

# insta snapshot pending files
**/*.snap.new
Loading
Loading