build: initial ci setup
Some checks failed
Test / build (map[name:stable]) (push) Successful in 1m9s
Test / build (map[name:nightly]) (push) Successful in 1m28s
Release Please / Release-plz (push) Failing after 13s

This commit is contained in:
Paul Campbell 2024-11-29 14:15:32 +00:00
parent 11dec4a929
commit 3c57554475
9 changed files with 171 additions and 8 deletions

View file

@ -0,0 +1,36 @@
name: Release Please
permissions:
pull-requests: write
contents: write
on:
push:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
release-plz:
name: Release-plz
runs-on: docker
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run release-plz release-pr
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: release-plz release-pr --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
- name: Run release-plz release
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: release-plz release --backend gitea --git-token ${{ secrets.FORGEJO_TOKEN }}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

View file

@ -0,0 +1,61 @@
name: Test
on:
push:
branches:
- next
pull_request:
branches:
- main
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: docker
strategy:
matrix:
toolchain:
- name: stable
- name: nightly
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check TODOs
uses: kemitix/todo-checker@v1.2.0
- name: Machete
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo machete
- name: Format
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo fmt --all -- --check
- name: Clippy
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset clippy
- name: Build
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset build
- name: Test
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo hack --feature-powerset test
- name: Mutations
uses: https://git.kemitix.net/kemitix/rust@v2.4.1
with:
args: ${{ matrix.toolchain.name }} cargo mutants -vV --in-place

28
.gitignore vendored
View file

@ -1 +1,27 @@
/target # ---> Rust
# Generated by Cargo
# will have compiled files and executables
debug/
target/
Cargo.lock
# cargo-bin-run cache
.bin
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# These are backup files generated by rustfmt
**/*.rs.bk
# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb
mutants.out/
mutants.out.old/
tarpaulin-report.html
*.profraw
.idea/
trello-to-deck.toml

7
Cargo.lock generated
View file

@ -1,7 +0,0 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "trello-to-deck"
version = "0.1.0"

View file

@ -4,3 +4,6 @@ version = "0.1.0"
edition = "2021" edition = "2021"
[dependencies] [dependencies]
[dev-dependencies]
mutants = "0.0"

9
LICENSE Normal file
View file

@ -0,0 +1,9 @@
MIT License
Copyright (c) 2024 Paul Campbell <pcampbell@kemitix.net>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

22
justfile Normal file
View file

@ -0,0 +1,22 @@
build:
#!/usr/bin/env bash
set -e
export RUSTFLAGS="-Cdebuginfo=2 -Cstrip=none --cfg=tarpaulin -Cinstrument-coverage -Clink-dead-code"
cargo fmt
cargo fmt --check
cargo clippy
# cargo build
cargo tarpaulin --skip-clean --out Html
# cargo test
# cargo doc
# cargo test --example get
build-mutations: build mutations
mutations:
cargo mutants --jobs 4 --baseline skip
# doc-test:
# cargo doc
# cargo test
# cargo test --example get

10
renovate.json Normal file
View file

@ -0,0 +1,10 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["config:recommended"],
"packageRules": [
{
"matchManagers": ["cargo"],
"rangeStrategy": "replace"
}
]
}

View file

@ -1,3 +1,6 @@
//
#[cfg_attr(test, mutants::skip)]
fn main() { fn main() {
println!("Hello, world!"); println!("Hello, world!");
} }