~sbinet/episto

2811f1fc85c37feb4b6026b46a7a8f765c2d3f42 — Sebastien Binet 4 months ago abd3c30
ci: add linux

Signed-off-by: Sebastien Binet <s@sbinet.org>
1 files changed, 30 insertions(+), 0 deletions(-)

A .builds/linux.yml
A .builds/linux.yml => .builds/linux.yml +30 -0
@@ 0,0 1,30 @@
# SPDX-License-Identifier: Unlicense OR MIT
image: debian/testing
packages:
 - curl
 - unzip
sources:
 - https://git.sr.ht/~sbinet/episto
environment:
 GOFLAGS: -mod=readonly
 PATH: /home/build/sdk/go/bin:/usr/bin:/home/build/go/bin
tasks:
 - install_go1_17: |
     mkdir -p /home/build/sdk
     curl -L https://golang.org/dl/go1.17.linux-amd64.tar.gz | tar -C /home/build/sdk -xzf -
 - test_linux: |
     cd episto
     go test -race ./...
 - check_gofmt: |
     cd episto
     test -z "$(gofmt -s -l .)"
 - check_sign_off: |
     set +x -e
     cd episto
     for hash in $(git log -n 20 --format="%H"); do
        message=$(git log -1 --format=%B $hash)
        if [[ ! "$message" =~ "Signed-off-by: " ]]; then
            echo "Missing 'Signed-off-by' in commit $hash"
            exit 1
        fi
     done