Skip to content

Go package build and test #433

Go package build and test

Go package build and test #433

Workflow file for this run

---
name: Go package build and test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 0 1 * *"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
- name: Build
run: make
- name: Formatting check
run: |
set -e -u -x
PICKFILES=./pick-files ./scripts/update-usage-information.sh
(( $(goftm -d *.go | wc -l) == 0 )) || false
gofmt -w *.go
(( $(git diff | wc -l) == 0 )) || false
- name: Simple test
run: |
set -e -u -x
./pick-files --version
./pick-files --number 10 --destination output-1 --folder artifacts/a/a
./pick-files --number 10 --destination output-2 --folder artifacts/a/a
./pick-files --number 10 --destination output-3 --folder artifacts/a/a
./pick-files --print-database-statistics
./pick-files --folder artifacts --suffix txt --destination-option append --destination output-4 --verbose
./pick-files --folder artifacts --suffix txt --destination-option append --destination output-4 --verbose
./pick-files --folder artifacts --suffix txt --destination-option append --destination output-4 --verbose
./pick-files --folder artifacts --suffix txt --destination-option append --destination output-4 --verbose
./pick-files --folder artifacts --suffix txt --destination-option append --destination output-4 --verbose
tree output-4
- name: Test
run: make test
- name: Coverage
run: make coverage