Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
DexterYan committed Oct 14, 2024
1 parent 402d111 commit dcc4cb7
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 23 deletions.
54 changes: 32 additions & 22 deletions .github/workflows/build-test-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,14 @@ concurrency:
jobs:
fail_if_pull_request_is_draft:
if: github.event.pull_request.draft == true
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass.
run: exit 1

test:
ensure-schemas-are-generated:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version: "1.22"
Expand All @@ -41,13 +38,22 @@ jobs:
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash
- name: Run linters
run: make install-golangci-lint lint
- name: Run tests
run: make test
- name: test
run: |
ls
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: check file
run: |
git rev-parse --abbrev-ref HEAD
cat pkg/client/troubleshootclientset/typed/troubleshoot/v1beta2/supportbundle.go
pwd
ls ./../../../
- run: make check-schemas

test-integration:
runs-on: ubuntu-latest
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -60,31 +66,33 @@ jobs:
shell: bash

- uses: actions/checkout@v4
- uses: replicatedhq/action-k3s@main
id: k3s
with:
version: v1.24.1-k3s1

- run: make test-integration
- run: make test

ensure-schemas-are-generated:
runs-on: ubuntu-latest
test-integration:
runs-on: ubuntu-20.04
steps:
- uses: actions/setup-go@v5
with:
go-version: "1.22"

- name: setup env
run: |
echo "GOPATH=$(go env GOPATH)" >> $GITHUB_ENV
echo "$(go env GOPATH)/bin" >> $GITHUB_PATH
shell: bash

- uses: actions/checkout@v4
- uses: replicatedhq/action-k3s@main
id: k3s
with:
fetch-depth: 0
- run: make check-schemas
version: v1.24.1-k3s1

- run: make test-integration

compile-preflight:
runs-on: ubuntu-latest
needs: ensure-schemas-are-generated
steps:
- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -174,6 +182,7 @@ jobs:

compile-supportbundle:
runs-on: ubuntu-latest
needs: ensure-schemas-are-generated
steps:
- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -249,6 +258,7 @@ jobs:

compile-collect:
runs-on: ubuntu-latest
needs: ensure-schemas-are-generated
steps:
- uses: actions/setup-go@v5
with:
Expand Down Expand Up @@ -388,4 +398,4 @@ jobs:
# if the validate-pr-tests job was successful, this job will succeed
- name: succeed if validate-pr-tests job succeeded
if: needs.validate-pr-tests.result == 'success'
run: echo "Validation succeeded"
run: echo "Validation succeeded"

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit dcc4cb7

Please sign in to comment.