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
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.rs]
indent_style = space
indent_size = 4

[*.{md,toml,yml,yaml}]
indent_style = space
indent_size = 2
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.ps1 text eol=crlf
*.png binary
Cargo.lock linguist-generated=true
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
# Wait a week before proposing a new version, so a compromised release
# that gets yanked never reaches a PR. Security updates are not delayed.
cooldown:
default-days: 7
groups:
cargo:
patterns: ["*"]
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 7
9 changes: 9 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!-- PR titles must be conventional commits, e.g. "fix: …" or "feat: …"; they become the changelog. -->

## What and why

## Checklist

- [ ] `cargo fmt`, `cargo clippy --all-targets -- -D warnings` and `cargo test` pass
- [ ] New commands or flags are covered by a test and documented in `docs/GUIDE.md`
- [ ] No API keys, customer data or private site content in code, tests or docs
40 changes: 39 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand All @@ -71,3 +71,41 @@ jobs:
- name: Guide renders
shell: bash
run: cargo run --locked --quiet -- guide setup | head -5

static-linux:
# The release ships static musl binaries; build one on every PR and run
# it on an old glibc and on Alpine so a release never finds out first.
name: Static Linux build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: stable
targets: x86_64-unknown-linux-musl
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- run: sudo apt-get update && sudo apt-get install -y musl-tools
- name: Build
env:
CC_x86_64_unknown_linux_musl: musl-gcc
run: cargo build --locked --target x86_64-unknown-linux-musl
- name: Runs on Debian 11 and Alpine
run: |
for image in debian:11 alpine:3; do
docker run --rm -v "$PWD/target/x86_64-unknown-linux-musl/debug:/b:ro" "$image" /b/firebird-cli --version
done

msrv:
name: MSRV (1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@683b588c487a69d01f6c6ddf40f036ff682cc2c8 # v1
with:
toolchain: "1.88"
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # v2.9.2
- run: cargo check --locked --all-targets
18 changes: 18 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: PR

on:
pull_request:
branches: [main]
types: [opened, edited, synchronize, reopened]

permissions:
pull-requests: read

jobs:
main:
name: Lint Title
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Quality

on:
push:
branches: [main]
pull_request:
branches: [main]
# Rerun periodically to pick up new advisories
schedule:
- cron: "0 0 * * *"
workflow_dispatch:

permissions:
contents: read

jobs:
deny:
# Advisories (RustSec), licenses, banned crates and sources; see deny.toml
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: EmbarkStudios/cargo-deny-action@3c6349835b2b7b196a839186cb8b78e02f7b5f25 # v2.1.1
with:
command: check advisories licenses bans sources

workflows:
# Lint the GitHub Actions workflows themselves (injection, permissions, pins)
name: Workflow lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: zizmorcore/zizmor-action@cc914d7f3750a2d13d75c7f184a1060aa0e9d482 # v0.6.4
with:
advanced-security: false # fail the job on findings instead of only uploading them
annotations: true
Loading
Loading