You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
53 lines
1.1 KiB
53 lines
1.1 KiB
name: CI |
|
|
|
on: |
|
push: |
|
branches: [main, develop] |
|
pull_request: |
|
branches: [main] |
|
|
|
jobs: |
|
test: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout code |
|
uses: actions/checkout@v4 |
|
|
|
- name: Set up Go |
|
uses: actions/setup-go@v5 |
|
with: |
|
go-version: '1.23' |
|
|
|
- name: Download libsecp256k1 |
|
run: | |
|
wget -q https://git.mleku.dev/mleku/nostr/raw/branch/main/crypto/p8k/libsecp256k1.so -O libsecp256k1.so |
|
chmod +x libsecp256k1.so |
|
|
|
- name: Run tests |
|
run: | |
|
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$(pwd)" |
|
CGO_ENABLED=0 go test ./... |
|
|
|
- name: Build binary |
|
run: | |
|
CGO_ENABLED=0 go build -o orly . |
|
./orly version |
|
|
|
lint: |
|
runs-on: ubuntu-latest |
|
steps: |
|
- name: Checkout code |
|
uses: actions/checkout@v4 |
|
|
|
- name: Set up Go |
|
uses: actions/setup-go@v5 |
|
with: |
|
go-version: '1.23' |
|
|
|
- name: Check go mod tidy |
|
run: | |
|
go mod tidy |
|
git diff --exit-code go.mod go.sum |
|
|
|
- name: Run go vet |
|
run: CGO_ENABLED=0 go vet ./...
|
|
|