-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1cba12c
commit 1624d48
Showing
32 changed files
with
633 additions
and
162 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,14 +60,14 @@ jobs: | |
run: find /tmp/receptor-testing -name controlsock -delete | ||
|
||
- name: Artifact receptor data | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].3 | ||
if: ${{ failure() }} | ||
with: | ||
name: test-logs | ||
path: /tmp/receptor-testing | ||
|
||
- name: Archive receptor binary | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].3 | ||
with: | ||
name: receptor | ||
path: /usr/local/bin/receptor |
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ on: # yamllint disable-line rule:truthy | |
|
||
env: | ||
DESIRED_GO_VERSION: '1.20' | ||
DESIRED_GOLANGCI_LINT_VERSION: 'v1.56' | ||
DESIRED_GOLANGCI_LINT_VERSION: 'v1.60' | ||
DESIRED_PYTHON_VERSION: '3.12' | ||
|
||
jobs: | ||
|
@@ -72,14 +72,14 @@ jobs: | |
run: find /tmp/receptor-testing -name controlsock -delete | ||
|
||
- name: Artifact receptor data for ${{ matrix.go-version }} | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].3 | ||
if: ${{ failure() }} | ||
with: | ||
name: test-logs-${{ matrix.go-version }} | ||
path: /tmp/receptor-testing | ||
|
||
- name: Archive receptor binary for ${{ matrix.go-version }} | ||
uses: actions/[email protected].0 | ||
uses: actions/[email protected].3 | ||
with: | ||
name: receptor-${{ matrix.go-version }} | ||
path: /usr/local/bin/receptor | ||
|
@@ -189,7 +189,7 @@ jobs: | |
run: sudo chmod a+x /usr/local/bin/receptor | ||
|
||
- name: Set up nox | ||
uses: wntrblm/nox@2024.04.15 | ||
uses: wntrblm/nox@2024.10.09 | ||
with: | ||
python-versions: ${{ env.DESIRED_PYTHON_VERSION }} | ||
|
||
|
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
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,82 @@ | ||
--- | ||
name: Generate junit test report | ||
|
||
on: # yamllint disable-line rule:truthy | ||
pull_request: # yamllint disable-line rule:empty-values | ||
push: | ||
branches: [devel] | ||
|
||
env: | ||
DESIRED_GO_VERSION: '1.20' | ||
|
||
jobs: | ||
go_test_coverage: | ||
name: go test coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ env.DESIRED_GO_VERSION }} | ||
|
||
- name: build and install receptor | ||
run: | | ||
make build-all | ||
sudo cp ./receptor /usr/local/bin/receptor | ||
- name: Download kind binary | ||
run: curl -Lo ./kind https://kind.sigs.k8s.io/dl/latest/kind-linux-amd64 && chmod +x ./kind | ||
|
||
- name: Create k8s cluster | ||
run: ./kind create cluster | ||
|
||
- name: Interact with the cluster | ||
run: kubectl get nodes | ||
|
||
- name: Install go junit reporting | ||
run: go install github.com/jstemmer/go-junit-report/v2@latest | ||
|
||
- name: Run receptor tests | ||
run: go test -v 2>&1 ./... | go-junit-report > report.xml | ||
|
||
- name: Upload test results to dashboard | ||
if: >- | ||
!cancelled() | ||
&& github.event_name == 'push' | ||
&& github.repository == 'ansible/receptor' | ||
&& github.ref_name == github.event.repository.default_branch | ||
run: >- | ||
curl -v --user "${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_USER }}:${{ secrets.PDE_ORG_RESULTS_UPLOAD_PASSWORD }}" | ||
--form "[email protected]" | ||
--form "component_name=receptor" | ||
--form "git_commit_sha=${{ github.sha }}" | ||
--form "git_repository_url=https://github.com/${{ github.repository }}" | ||
"${{ vars.PDE_ORG_RESULTS_AGGREGATOR_UPLOAD_URL }}/api/results/upload/" | ||
- name: get k8s logs | ||
if: ${{ failure() }} | ||
run: .github/workflows/artifact-k8s-logs.sh | ||
|
||
- name: remove sockets before archiving logs | ||
if: ${{ failure() }} | ||
run: find /tmp/receptor-testing -name controlsock -delete | ||
|
||
- name: Artifact receptor data | ||
uses: actions/[email protected] | ||
if: ${{ failure() }} | ||
with: | ||
name: test-logs | ||
path: /tmp/receptor-testing | ||
|
||
- name: Archive receptor binary | ||
uses: actions/[email protected] | ||
with: | ||
name: receptor | ||
path: /usr/local/bin/receptor |
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,4 @@ | ||
sonar.python.version=3.8, 3.9, 3.11, 3.12 | ||
sonar.sources=. | ||
sonar.test.inclusions=**/*_test.go, receptorctl/tests/ | ||
sonar.tests=. |
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
Oops, something went wrong.