Skip to content

Commit

Permalink
Update integration test workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Yi Chen <[email protected]>
  • Loading branch information
ChenYi015 committed Jul 22, 2024
1 parent 61dc679 commit ad5be9b
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,16 @@ jobs:
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod

- name: Run go fmt check
run: make fmt-check
run: make go-fmt

- name: Run go vet check
run: make go-vet
Expand Down Expand Up @@ -91,8 +93,22 @@ jobs:
build-helm-chart:
runs-on: ubuntu-20.04
steps:
- name: Determine branch name
id: get_branch
run: |
BRANCH=""
if [ "${{ github.event_name }}" == "push" ]; then
BRANCH=${{ github.ref }}
elif [ "${{ github.event_name }}" == "pull_request" ]; then
BRANCH=${{ github.base_ref }}
fi
echo "Branch name: $BRANCH"
echo "BRANCH=$BRANCH" >> "$GITHUB_OUTPUT"
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Helm
uses: azure/setup-helm@v4
Expand All @@ -114,12 +130,14 @@ jobs:
run: ct version

- name: Run chart-testing (lint)
run: ct lint
run: ct lint --check-version-increment=false

- name: Run chart-testing (list-changed)
id: list-changed
env:
BRANCH: ${{ steps.get_branch.outputs.BRANCH }}
run: |
changed=$(ct list-changed --target-branch ${{ github.ref }})
changed=$(ct list-changed --target-branch $BRANCH)
if [[ -n "$changed" ]]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
Expand Down

0 comments on commit ad5be9b

Please sign in to comment.