forked from abhinavxd/libredesk
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (48 loc) · 1.56 KB
/
Copy pathgo.yml
File metadata and controls
56 lines (48 loc) · 1.56 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
name: Go
on:
push:
branches: ['**']
pull_request:
branches: ['**']
jobs:
vet:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24.3'
# gofmt -l is intentionally NOT enforced here — the inherited upstream
# tree has ~35 files that aren't gofmt-clean and reformatting them now
# would create persistent friction on upstream merges. Run gofmt
# locally on files you touch; the lint job below also catches the
# high-signal issues.
- name: go vet
run: go vet ./...
build-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Build with both the default (Community Edition) and the helperiqpro
# tag so a Pro-only import (magento2/shopify/woocommerce) or a CE-only
# stub regression is caught here, not at deploy time.
edition: [ce, helperiqpro]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24.3'
- name: Compute build tags
id: tags
run: |
if [ "${{ matrix.edition }}" = "helperiqpro" ]; then
echo "tags=-tags helperiqpro" >> "$GITHUB_OUTPUT"
else
echo "tags=" >> "$GITHUB_OUTPUT"
fi
- name: go build (${{ matrix.edition }})
run: |
CGO_ENABLED=0 go build ${{ steps.tags.outputs.tags }} -o /tmp/libredesk ./cmd/
- name: go test
run: go test -count=1 ${{ steps.tags.outputs.tags }} ./...