-
Notifications
You must be signed in to change notification settings - Fork 312
69 lines (59 loc) · 1.76 KB
/
build-and-release.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
name: Test and build
on:
push:
branches:
- ci-migration
env:
# following envs are added for the back compatibility
# we need to check if they are used at all
GO_PACKAGE: github.com/mysteriumnetwork/node
GOFLAGS: "-count=1"
GITHUB_OWNER: "mysteriumnetwork"
GITHUB_REPO: "node"
GITHUB_SNAPSHOT_REPO: "node-builds"
GITHUB_API_TOKEN: ""
BUILD_BRANCH: ${{ github.ref_name }}
BUILD_NUMBER: ${{ github.job_id }}
# BUILD_COMMIT: $CI_COMMIT_SHORT_SHA
# BUILD_BRANCH_SAFE: $CI_COMMIT_REF_SLUG
# BUILD_TAG: $CI_COMMIT_TAG
# GIT_CLONE_PATH:
jobs:
test-and-build:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: '1.21.x'
- name: Install protoc
run: sudo apt install -y protobuf-compiler
# - name: Prepare Env
# run: |
# go run mage.go -v GenerateEnvFile
- name: Unit tests and linters
run: |
go run mage.go -v Generate
go run mage.go -v Check
go run mage.go -v TestWithCoverage
- name: Upload codecov report
uses: codecov/codecov-action@v4
with:
file: ./coverage.txt
token: ${{ secrets.CODECOV_TOKEN }}
- name: E2E basic test
run: |
go run mage.go -v TestE2EBasic
# - name: E2E NAT test
# create-release:
# name: Create Release
# if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
# runs-on: ubuntu-latest
# needs: publish-images
# - name: Login to Docker Hub
# uses: docker/login-action@v3
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}