Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,49 @@ jobs:
golangci-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@1e7e51e771db61008b38414a730f564565cf7c20 # v9

go-test:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: Run unit tests
run: go test -count=1 -short -race ./...

integration-test:
runs-on: ubuntu-latest
needs: [unit-test]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- uses: robherley/go-test-action@42a1975c97156330b5126c2f35ef0fb78c4c7154 # v0.7.1
- name: Run integration tests
run: go test -v -count=1 -race -tags integration -timeout 15m ./...

cargo:
uses: vexxhost/github-actions/.github/workflows/cargo.yml@main
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: Build binary
run: go build -o /dev/null ./cmd/openstack-database-exporter

image:
uses: vexxhost/github-actions/.github/workflows/nix-image.yaml@main
permissions:
id-token: write
contents: read
packages: write
with:
push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
# image:
# needs: [golangci-lint, unit-test, build]
# uses: vexxhost/github-actions/.github/workflows/nix-image.yaml@main
# permissions:
# id-token: write
# contents: read
# packages: write
# with:
# push: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }}
2 changes: 1 addition & 1 deletion .github/workflows/periodic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jobs:
steps:
- uses: vexxhost/github-actions/scan-image@main
with:
image-ref: ghcr.io/${{ github.repository_owner }}/ubuntu:edge
image-ref: ghcr.io/${{ github.repository_owner }}/openstack-database-exporter:edge
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
.direnv
/target
result*
openstack-database-exporter
/openstack-database-exporter
Loading