Skip to content

Commit 150fdfe

Browse files
Merge branch 'main' into proj/parent-child
2 parents 1a81a0d + e7939e8 commit 150fdfe

File tree

79 files changed

+5311
-1715
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+5311
-1715
lines changed

.github/labels.yml

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
1-
- name: added-feature
1+
# PR Labels
2+
- name: new-feature
23
description: for new features in the changelog.
3-
color: a2eeef
4-
- name: changed
5-
description: for changes in existing functionality in the changelog.
6-
color: a2eeef
7-
- name: deprecated
8-
description: for soon-to-be removed features in the changelog.
9-
color: e4e669
10-
- name: removed
11-
description: for now removed features in the changelog.
12-
color: e4e669
4+
color: 225fee
5+
- name: improvement
6+
description: for improvements in existing functionality in the changelog.
7+
color: 22ee47
8+
- name: repo-ci-improvement
9+
description: for improvements in the repository or CI workflow in the changelog.
10+
color: c922ee
1311
- name: bugfix
1412
description: for any bug fixes in the changelog.
15-
color: d73a4a
16-
- name: security
17-
description: for vulnerabilities in the changelog.
18-
color: dd4739
19-
- name: bug
20-
description: Something isn't working in this issue.
21-
color: d73a4a
13+
color: ed8e21
14+
- name: documentation
15+
description: for updates to the documentation in the changelog.
16+
color: d3e1e6
17+
- name: dependencies
18+
description: dependency updates usually from dependabot
19+
color: 5c9dff
20+
- name: testing
21+
description: for updates to the testing suite in the changelog.
22+
color: 933ac9
23+
- name: breaking-change
24+
description: for breaking changes in the changelog.
25+
color: ff0000
26+
- name: ignore-for-release
27+
description: PRs you do not want to render in the changelog
28+
color: 7b8eac
29+
- name: do-not-merge
30+
description: PRs that should not be merged until the commented issue is resolved
31+
color: eb1515
32+
# Issue Labels
2233
- name: enhancement
23-
description: New feature request in this issue.
24-
color: a2eeef
25-
- name: good first issue
26-
description: Low hanging fruit.
27-
color: 7057ff
28-
- name: help wanted
29-
description: I need some help.
30-
color: 008672
34+
description: issues that request a enhancement
35+
color: 22ee47
36+
- name: bug
37+
description: issues that report a bug
38+
color: ed8e21

.github/release-drafter.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
changelog:
2+
exclude:
3+
labels:
4+
- ignore-for-release
5+
categories:
6+
- title: ⚠️ Breaking Change
7+
labels:
8+
- breaking-change
9+
- title: 🐛 Bug Fixes
10+
labels:
11+
- bugfix
12+
- title: 🚀 New Features
13+
labels:
14+
- new-feature
15+
- title: 💡 Improvements
16+
labels:
17+
- improvement
18+
- title: 🧪 Testing Improvements
19+
labels:
20+
- testing
21+
- title: ⚙️ Repo/CI Improvements
22+
labels:
23+
- repo-ci-improvement
24+
- title: 📖 Documentation
25+
labels:
26+
- documentation
27+
- title: 📦 Dependency Updates
28+
labels:
29+
- dependencies
30+
- title: Other Changes
31+
labels:
32+
- "*"
Lines changed: 29 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Testing
1+
name: Continuous Integration
22

33
on:
44
workflow_dispatch: null
@@ -8,6 +8,25 @@ on:
88
pull_request: null
99

1010
jobs:
11+
lint-tidy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-go@v5
16+
with:
17+
go-version: stable
18+
19+
- name: golangci-lint
20+
uses: golangci/golangci-lint-action@v6
21+
with:
22+
version: latest
23+
24+
- name: Run tidy
25+
run: make tidy
26+
27+
- name: Fail if changes
28+
run: git diff-index --exit-code HEAD
29+
1130
test:
1231
runs-on: ubuntu-latest
1332
env:
@@ -25,24 +44,6 @@ jobs:
2544
go-version: 'stable'
2645
- run: go version
2746

28-
- name: Run tidy
29-
run: make tidy
30-
31-
- name: Run fmt
32-
run: go fmt ./...
33-
34-
- name: Fail if changes
35-
run: git diff-index --exit-code HEAD
36-
37-
- name: Run linter
38-
run: make lint
39-
40-
- name: Update system packages
41-
run: sudo apt-get update -y
42-
43-
- name: Install system deps
44-
run: sudo apt-get install -y build-essential
45-
4647
- name: Setup Python
4748
uses: actions/setup-python@v5
4849
with:
@@ -54,42 +55,25 @@ jobs:
5455
- name: Install go-junit-report
5556
run: go install github.com/jstemmer/go-junit-report/v2@latest
5657

58+
- name: Set report filename
59+
run: echo "REPORT_FILENAME=$(date +'%Y%m%d%H%M')_linodego_test_report.xml" >> $GITHUB_ENV
60+
5761
- name: Run tests and save test report
5862
run: |
59-
timestamp=$(date +'%Y%m%d%H%M')
60-
report_filename="${timestamp}_linodego_test_report.xml"
61-
62-
if ! make test | go-junit-report -set-exit-code > "$report_filename"; then
63-
echo "EXIT_STATUS=1" >> $GITHUB_ENV
64-
fi
65-
cat "$report_filename"
63+
make test | go-junit-report -set-exit-code -iocopy -out $REPORT_FILENAME
6664
env:
6765
SKIP_LINT: 1
6866

69-
- name: Add additional information to XML report
70-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
67+
- name: Upload test results to bucket
68+
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && always()
7169
run: |
72-
filename=$(ls | grep -E '^[0-9]{12}_linodego_test_report\.xml$')
7370
python tod_scripts/add_to_xml_test_report.py \
7471
--branch_name "${GITHUB_REF#refs/*/}" \
7572
--gha_run_id "$GITHUB_RUN_ID" \
7673
--gha_run_number "$GITHUB_RUN_NUMBER" \
77-
--xmlfile "${filename}"
78-
79-
- name: Upload test results to bucket
80-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
74+
--xmlfile "$REPORT_FILENAME"
75+
sync
76+
python tod_scripts/test_report_upload_script.py "$REPORT_FILENAME"
8177
env:
8278
LINODE_CLI_OBJ_ACCESS_KEY: ${{ secrets.LINODE_CLI_OBJ_ACCESS_KEY }}
8379
LINODE_CLI_OBJ_SECRET_KEY: ${{ secrets.LINODE_CLI_OBJ_SECRET_KEY }}
84-
run: |
85-
report_filename=$(ls | grep -E '^[0-9]{12}_linodego_test_report\.xml$')
86-
python tod_scripts/test_report_upload_script.py "${report_filename}"
87-
88-
- name: Test Execution Status Handler
89-
run: |
90-
if [[ "$EXIT_STATUS" != 0 ]]; then
91-
echo "Test execution contains failure(s)"
92-
exit $EXIT_STATUS
93-
else
94-
echo "Tests passed!"
95-
fi

.github/workflows/label-sync.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/labeler.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: labeler
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
paths:
8+
- '.github/labels.yml'
9+
- '.github/workflows/labeler.yml'
10+
pull_request:
11+
paths:
12+
- '.github/labels.yml'
13+
- '.github/workflows/labeler.yml'
14+
15+
jobs:
16+
labeler:
17+
runs-on: ubuntu-latest
18+
steps:
19+
-
20+
name: Checkout
21+
uses: actions/checkout@v4
22+
-
23+
name: Run Labeler
24+
uses: crazy-max/ghaction-github-labeler@de749cf181958193cb7debf1a9c5bb28922f3e1b
25+
with:
26+
github-token: ${{ secrets.GITHUB_TOKEN }}
27+
yaml-file: .github/labels.yml
28+
dry-run: ${{ github.event_name == 'pull_request' }}
29+
exclude: |
30+
help*
31+
*issue
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Release Terraform cross repository test
2+
3+
on:
4+
workflow_dispatch: # Manual trigger
5+
6+
jobs:
7+
terraform_integration_test:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: checkout terraform repo
11+
uses: actions/checkout@v4
12+
with:
13+
repository: linode/terraform-provider-linode
14+
15+
- name: Set up Go
16+
uses: actions/setup-go@v5
17+
with:
18+
go-version: 'stable'
19+
- run: go version
20+
- run: make deps
21+
22+
- name: Clone Repository
23+
uses: actions/checkout@v4
24+
with:
25+
path: linodego
26+
27+
- name: Set up linodego
28+
run: |
29+
cd linodego
30+
linodego_dir=$(pwd)
31+
cd ..
32+
go mod edit -replace github.com/linode/linodego=$linodego_dir
33+
go mod tidy
34+
35+
- name: run tests
36+
run: |
37+
make int-test
38+
env:
39+
LINODE_TOKEN: ${{ secrets.DX_LINODE_TOKEN }}

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.golangci.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,15 @@ linters-settings:
77
check-blank: true
88

99
govet:
10-
check-shadowing: true
11-
1210
enable:
1311
- atomicalign
14-
enable-all: false
15-
disable:
1612
- shadow
13+
enable-all: false
1714
disable-all: false
18-
golint:
19-
min-confidence: 0.8
2015
gocyclo:
2116
min-complexity: 30
2217
gocognit:
2318
min-complexity: 30
24-
maligned:
25-
suggest-new: true
2619
dupl:
2720
threshold: 100
2821

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ citest: lint test
2525

2626
testunit:
2727
go test -v $(PACKAGES) $(ARGS)
28-
cd test && make unit-test
28+
cd test && make testunit
2929

3030
testint:
31-
cd test && make test
31+
cd test && make testint
3232

3333
testcov-func:
3434
@go test -v -coverprofile="coverage.txt" . > /dev/null 2>&1

0 commit comments

Comments
 (0)