diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml new file mode 100644 index 00000000..2fed6377 --- /dev/null +++ b/.github/workflows/e2e.yml @@ -0,0 +1,41 @@ +--- +name: E2E + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + e2e: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set version env variables + run: | + cat .version >> $GITHUB_ENV + + - name: Setup Go + uses: actions/setup-go@v4 + with: + go-version: "${{env.GO_VERSION}}" + + - name: Generate certificates + run: make -C e2e/certs certs + + - name: Build Docker image + run: make update-devel-image + + - name: Run e2e test + run: make -C e2e run-e2e + + - name: Docker Compose file + if: failure() + run: cat e2e/docker-compose.yaml + + - name: Docker Logs + if: failure() + run: make -C e2e dump-logs diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 063b5933..71d029e0 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -23,7 +23,7 @@ jobs: with: version: "${{env.GOLANGCI_LINT_VERSION}}" - test-ubuntu: + ubuntu-test: runs-on: ubuntu-latest steps: - name: Checkout code @@ -44,7 +44,7 @@ jobs: - name: Run unit test run: make test coverage - test-windows: + windows-test: runs-on: windows-latest steps: - name: Checkout code @@ -57,35 +57,3 @@ jobs: - name: Run martian unit test run: make -C internal/martian test - - e2e: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Set version env variables - run: | - cat .version >> $GITHUB_ENV - - - name: Setup Go - uses: actions/setup-go@v4 - with: - go-version: "${{env.GO_VERSION}}" - - - name: Generate certificates - run: make -C e2e/certs certs - - - name: Build Docker image - run: make update-devel-image - - - name: Run e2e test - run: make -C e2e run-e2e - - - name: Docker Compose file - if: failure() - run: cat e2e/docker-compose.yaml - - - name: Docker Logs - if: failure() - run: make -C e2e dump-logs diff --git a/.github/workflows/govulncheck.yml b/.github/workflows/govulncheck.yml new file mode 100644 index 00000000..a92a340c --- /dev/null +++ b/.github/workflows/govulncheck.yml @@ -0,0 +1,29 @@ +--- +name: Vulnerability check + +on: + push: + branches: [main] + pull_request: + branches: [main] + paths: + - 'go.mod' + - 'go.sum' + +jobs: + govulncheck: + runs-on: ubuntu-latest + name: Run govulncheck + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set version env variables + run: | + cat .version >> $GITHUB_ENV + + - id: Run govulncheck + uses: golang/govulncheck-action@v1 + with: + go-version-input: "${{env.GO_VERSION}}" + go-package: ./...