Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
APIGOV-27565 - add shareable test
Browse files Browse the repository at this point in the history
  • Loading branch information
dfeldick committed May 9, 2024
1 parent c46fbcb commit 688462e
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 17 deletions.
36 changes: 20 additions & 16 deletions .github/workflows/build-agents.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
name: Build Webmethods Discovery and Traceability Agents
name: Build agents

on:
push:
branches: [main, '*']

jobs:
test:
env:
GOFLAGS: "-mod=mod"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Test
working-directory: .
run: |
make test
build:
testAgents:
uses: ./.github/workflows/run-tests.yml

# test:
# env:
# GOFLAGS: "-mod=mod"
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Go
# uses: actions/setup-go@v5
# with:
# go-version: 1.21
# - name: Test
# working-directory: .
# run: |
# make test

buildAgents:
env:
GOFLAGS: "-mod=mod"
VERSION: ${{ github.ref_name }}
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/build-docker-images.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
name: Discovery Agent Docker
name: Build docker images

on:
push:
tags:
- "*"

jobs:
testAgents:
uses: ./.github/workflows/run-tests.yml

buildDiscoveryAgentDocker:
needs: testAgents
env:
GOFLAGS: "-mod=mod"
GOWORK: "off"
Expand Down Expand Up @@ -48,6 +52,7 @@ jobs:
COMMIT_ID=${{ env.commitId }}
buildTraceabilityAgentDocker:
needs: testAgents
env:
GOFLAGS: "-mod=mod"
GOWORK: "off"
Expand Down Expand Up @@ -92,6 +97,7 @@ jobs:
runs-on: ubuntu-latest
needs: [buildDiscoveryAgentDocker, buildTraceabilityAgentDocker]
steps:
- uses: actions/checkout@v4
- name: Notify Teams channel
env:
TEAMS_WEBHOOK_URL: ${{ secrets.TEAMS_WEBHOOK_URL }}
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Test the agents

on:
workflow_call

jobs:
test:
env:
GOFLAGS: "-mod=mod"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.21
- name: Test
working-directory: .
run: |
make test

0 comments on commit 688462e

Please sign in to comment.