-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions equivalents for some Drone builds. (#2527)
The Drone builds will be deleted once the GitHub Actions are more battle tested.
- Loading branch information
Showing
3 changed files
with
60 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Test | ||
on: | ||
pull_request: | ||
jobs: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
- run: sudo apt-get update -y && sudo apt-get install -y libsystemd-dev | ||
- run: make lint | ||
|
||
test_linux: | ||
name: Test Linux | ||
runs-on: ubuntu-latest | ||
container: grafana/alloy-build-image:v0.1.8 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
cache: false | ||
- run: make GO_TAGS="nodocker" test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Test (Windows) | ||
on: | ||
# TODO: Run the Windows tests for each PR? | ||
# For now we don't do it just because it takes time. | ||
push: | ||
# TODO: Also run the tests when a Windows-specific features is changed. | ||
# For example, the Windows Exporter for Prometheus and Event Log tailers. | ||
branches: | ||
- main | ||
jobs: | ||
test_windows: | ||
name: Test (Windows) | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Go 1.23 | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
# TODO: Enable caching later. | ||
# We'll need to make sure the same cache is reused by the workflow to build Windows binaries. | ||
cache: false | ||
- name: Test | ||
run: '& "C:/Program Files/git/bin/bash.exe" -c ''go test -tags="nodocker,nonetwork" | ||
./...''' |