-
Notifications
You must be signed in to change notification settings - Fork 27
/
bitrise.yml
79 lines (68 loc) · 2.06 KB
/
bitrise.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
format_version: "11"
default_step_lib_source: https://github.com/bitrise-io/bitrise-steplib.git
project_type: other
app:
envs:
- BIN_NAME: envman
workflows:
test:
after_run:
- run_integration_tests
title: Runs tests
steps:
- go-list: { }
- script:
title: golangci-lint
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.57.2
asdf reshim golang
golangci-lint run
- go-test: { }
run_integration_tests:
steps:
- script:
title: Run integration tests
inputs:
- content: |-
#!/usr/bin/env bash
set -ex
current_envman="$(pwd)/_tmp/test_envman"
export CGO_ENABLED=0
go build -o "$current_envman"
export PR="" PULL_REQUEST_ID=""
export INTEGRATION_TEST_BINARY_PATH="$current_envman"
# prevent the env var content (with the content of this script)
# being added to the test process environment
unset content
go test -v ./_tests/integration/...
create-release:
description: Creates Linux and Darwin binaries, then publishes a GitHub release
envs:
- GITHUB_TOKEN: $GIT_BOT_USER_ACCESS_TOKEN # Goreleaser expects this env var
steps:
- script:
title: Goreleaser (create binaries + publish to GH)
deps:
brew:
- name: goreleaser
inputs:
- content: |
#!/usr/bin/env bash
set -ex
goreleaser release
test-binary-build:
description: Tests the release build process by creating a snapshot release (without publishing)
steps:
- script:
title: Goreleaser (create snapshot binaries)
deps:
brew:
- name: goreleaser
inputs:
- content: |
#!/usr/bin/env bash
set -ex
goreleaser release --snapshot --rm-dist