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

separate dev cli from integrations tests #4091

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
@@ -1,23 +1,20 @@
on:
workflow_run:
workflows: ["Deploy Porter to Internal Tooling"]
branches: [master]
types:
- completed
name: Release dev cli and run integration tests
push:
tags:
- dev
name: Release dev cli
jobs:
build-linux:
name: Build Linux binaries
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: '1.20.5'
go-version: "1.20.5"
go-version-file: go.mod
- name: Build Linux binaries
run: |
Expand Down Expand Up @@ -89,19 +86,3 @@ jobs:
run: |
docker tag ghcr.io/porter-dev/porter/porter-cli:dev ghcr.io/porter-dev/porter/porter-cli:dev
docker push ghcr.io/porter-dev/porter/porter-cli:dev
run-integration-tests:
name: run integration tests to test new build
runs-on: ubuntu-latest
needs: build-push-docker-cli
steps:
- name: Porter app run
uses: porter-dev/[email protected]
with:
command: app run app-integration-tests --job trigger
env:
PORTER_CLUSTER: "142"
PORTER_HOST: https://dashboard.internal-tools.porter.run
PORTER_PROJECT: "301"
PORTER_TOKEN: ${{ secrets.APP_INTEGRATION_PROJECT_TOKEN }}
PORTER_SERVICE: porter
PORTER_COMMIT: ${{ github.sha }}
58 changes: 58 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
on:
workflow_run:
workflows: ["Deploy Porter to Internal Tooling"]
branches: [master]
types:
- completed
name: Run integration tests
jobs:
build-linux:
name: Build Linux binaries
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
cache: false
go-version: "1.20.5"
go-version-file: go.mod
- name: Build Linux binaries
run: |
go build -ldflags="-w -s -X 'github.com/porter-dev/porter/cli/cmd/config.Version=dev_${{ github.sha }}' -X 'github.com/porter-dev/porter/cli/cmd/errors.SentryDSN=${{secrets.SENTRY_DSN}}'" -a -tags cli -o ./porter ./cli &
wait
env:
GOOS: linux
GOARCH: amd64
CGO_ENABLED: 0
- name: Zip Linux binaries
run: |
mkdir -p ./release/linux
zip --junk-paths ./release/linux/porter_dev_${{ github.sha }}_Linux_x86_64.zip ./porter
- name: Upload binaries
uses: actions/upload-artifact@v3
with:
name: go-binaries-cli
path: bin/
retention-days: 1
run-integration-tests:
name: run integration tests to test new build
runs-on: ubuntu-latest
needs: build-linux
steps:
- name: Get built CLI
uses: actions/download-artifact@v3
with:
name: go-binaries-cli
path: bin/
- name: Porter app run
run: bin/porter app run app-integration-tests --job trigger
env:
PORTER_CLUSTER: "142"
PORTER_HOST: https://dashboard.internal-tools.porter.run
PORTER_PROJECT: "301"
PORTER_TOKEN: ${{ secrets.APP_INTEGRATION_PROJECT_TOKEN }}
PORTER_SERVICE: porter
PORTER_COMMIT: ${{ github.sha }}