Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add github action #2084

Closed
wants to merge 1 commit into from
Closed
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
98 changes: 98 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Go

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:

tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache libraries
uses: actions/cache@v2
env:
cache-name: cache-go
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Env
run: go env
- name: Build
run: make build build-test-tools
- name: Test
run: make check pristine test

- name: Prepare tar to upload built binaries
run: tar -cvf built-binaries.tar helmfile diff-yamls yamldiff
- name: Upload built binaries
uses: actions/upload-artifact@v2
with:
name: built-binaries-${{ github.run_id }}
path: built-binaries.tar
retention-days: 1
- name: Display built binaries
run: ls -l helmfile diff-yamls yamldiff

integration_tests:
needs: tests
runs-on: ubuntu-latest
strategy:
matrix:
include:
- helm-version: v3.4.2
- helm-version: v3.5.4
- helm-version: v3.6.3
- helm-version: v3.7.2
- helm-version: v3.8.0
steps:
- uses: actions/checkout@v2
- name: Cache libraries
uses: actions/cache@v2
env:
cache-name: cache-go
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.17
- name: Env
run: go env

- name: Download built binaries
uses: actions/download-artifact@v2
with:
name: built-binaries-${{ github.run_id }}
- name: Extract tar to get built binaries
run: tar -xvf built-binaries.tar
- name: Display built binaries
run: ls -l helmfile diff-yamls yamldiff

- name: Install test dependencies
env:
HELM_VERSION: ${{ matrix.helm-version }}
run: make -C .circleci helm vault sops kustomize
- name: Start minikube
uses: medyagh/setup-minikube@master
- name: Execute integration tests
env:
HELMFILE_HELM3: 1
TERM: xterm
run: make integration