diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 4d63d317..00000000 --- a/.drone.yml +++ /dev/null @@ -1,171 +0,0 @@ -kind: pipeline -type: docker -name: lint - -steps: - - name: lint - image: golang:1.17 - commands: - - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.47.2 - - golangci-lint run ---- -kind: pipeline -type: exec -name: testing - -platform: - os: linux - arch: amd64 - -workspace: - path: /tmp/drone - -steps: - - name: Build bbi - commands: - - mkdir -p /tmp/${DRONE_BUILD_NUMBER} ; git rev-parse HEAD > /tmp/${DRONE_BUILD_NUMBER}/bbi_hash - - # this is a hack around the current design; will clean up after passing a test or two - - go build -o bbi cmd/bbi/main.go - - ./bbi version - - name: Copy commit hashes to s3 - commands: - - printf "[\n" > /tmp/${DRONE_BUILD_NUMBER}/commits.json - - printf " {\"repo\":\"metrumresearchgroup/bbi\", \"commit\":\"$(cat /tmp/${DRONE_BUILD_NUMBER}/bbi_hash)\"},\n" >> /tmp/${DRONE_BUILD_NUMBER}/commits.json - - printf "]\n" >> /tmp/${DRONE_BUILD_NUMBER}/commits.json - - aws s3 cp /tmp/${DRONE_BUILD_NUMBER}/commits.json s3://mrg-validation/bbi/${DRONE_BUILD_NUMBER}/commits.json - - name: Copy summary info for mrgvalidate to s3 - commands: - - | - cat > /tmp/${DRONE_BUILD_NUMBER}/summary.json <>$GITHUB_PATH + - name: Integration tests (postrun) + shell: bash + run: | + bbi version + go test ./integration/postrun + release: + if: github.ref_type == 'tag' + name: Make release + needs: check + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - uses: actions/setup-go@v5 + with: + go-version: stable + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v6 + with: + distribution: goreleaser + version: '~> v2' + args: release --clean + workdir: cmd/bbi + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}