add sr.ht support
This commit is contained in:
parent
f0033bbe66
commit
74a7b3ba16
3 changed files with 40 additions and 0 deletions
23
.build.yml
Normal file
23
.build.yml
Normal file
|
@ -0,0 +1,23 @@
|
|||
image: nixos/latest
|
||||
sources:
|
||||
- git@git.sr.ht:~cyplo/bakare
|
||||
|
||||
secrets:
|
||||
- b7161fff-05f4-4470-b4a1-57bd67dede23
|
||||
- 996295b0-681c-49e8-8774-1be2f3e0bfe9
|
||||
|
||||
environment:
|
||||
CI: "true"
|
||||
|
||||
tasks:
|
||||
- test: |
|
||||
cd bakare
|
||||
nix-shell --pure --run "./scripts/test.sh"
|
||||
nix-shell --pure --run "./scripts/package.sh"
|
||||
|
||||
- github_push: |
|
||||
set +xv
|
||||
cd bakare
|
||||
GITHUB_TOKEN=`cat ~/.github_token`
|
||||
git remote add github https://cyplo:$GITHUB_TOKEN@github.com/cyplo/bakare.git
|
||||
nix-shell --pure --run 'git push github --all --force'
|
5
scripts/package.sh
Executable file
5
scripts/package.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
cargo doc
|
||||
cargo package
|
12
scripts/test.sh
Executable file
12
scripts/test.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [[ ! -z $CI ]]; then
|
||||
export CARGO_HUSKY_DONT_INSTALL_HOOKS=true
|
||||
fi
|
||||
|
||||
cargo fmt -- --check
|
||||
cargo clippy --all-targets --all-features -- -D warnings
|
||||
cargo check
|
||||
cargo test
|
||||
cargo test -- --ignored
|
Loading…
Reference in a new issue