Skip to content

Commit

Permalink
ci: add integration to highlight breaking changes (#344)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsdmike authored Jun 5, 2024
1 parent 3e4cc79 commit 5486fca
Showing 1 changed file with 73 additions and 0 deletions.
73 changes: 73 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# This workflow will do a clean install of go dependencies, build the source code and run tests across different versions of go

name: Go Integration CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
permissions:
contents: read

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
runs-on: ubuntu-latest

strategy:
matrix:
go-version: [1.21.x, 1.22.x]

steps:
- name: Harden Runner
uses: step-security/harden-runner@a4aa98b93cab29d9b1101a6143fb8bce00e2eac4 # v2.7.1
with:
egress-policy: audit

- name: Install Go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ matrix.go-version }}

- name: Checkout code
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29


- name: Checkout rpc-go repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: open-amt-cloud-toolkit/rpc-go
path: rpc-go
ref: main

- name: Checkout console repository
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with:
repository: open-amt-cloud-toolkit/console
path: console
ref: main

- name: Set go-wsman-messages dependency to current branch
run: |
cd rpc-go
go mod edit -replace github.com/open-amt-cloud-toolkit/go-wsman-messages=../${{ github.repository }}
cd ../console
go mod edit -replace github.com/open-amt-cloud-toolkit/go-wsman-messages=../${{ github.repository }}
- name: Build rpc-go
run: |
cd rpc-go
go build -o rpc ./cmd/main.go
- name: Build console
run: |
cd console
CGO_ENABLED=0 go build -o console ./cmd/app/main.go
- name: Run tests
run: |
go test ./...

0 comments on commit 5486fca

Please sign in to comment.