Repository navigation
78 lines (64 loc) · 1.78 KB
/
Copy pathpipeline.yaml
File metadata and controls
78 lines (64 loc) · 1.78 KB
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
name: IBM Cloud Object Storage Plugin
on:
push:
branches:
- master
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
permissions:
contents: write # needed to push to gh-pages
pull-requests: write # needed to comment on PRs
strategy:
matrix:
go-version: ["1.26.10", "stable"]
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache: true
- name: Install system dependencies (bc + docker)
run: |
sudo apt-get update -qq
sudo apt-get install -y bc docker-ce-cli
- name: Make scripts executable
run: chmod +x scripts/*.sh
- name: Prepare environment
run: |
export GO111MODULE=on
go mod tidy
make deps
- name: Check code formatting
run: make fmt
- name: Run unit tests
run: make test
- name: Generate coverage
run: |
make coverage
./scripts/calculateCoverage.sh
touch "Passing" || touch "Failed"
- name: Build driver & provisioner image
run: |
make driver
make provisioner
- name: Publish coverage
if: success() && matrix.go-version == 'stable'
env:
GHE_TOKEN: ${{ secrets.GHE_TOKEN }}
run: |
./scripts/publishCoverage.sh