Skip to content

Commit

Permalink
modify run-unit-test line 43
Browse files Browse the repository at this point in the history
  • Loading branch information
nasir19noor committed Jan 8, 2025
1 parent 284603c commit 8d6e777
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 1 deletion.
76 changes: 76 additions & 0 deletions .github/actions/setup-env/action.yml_backup
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


# Action used to set up the environment. This assumes that we are using
# a Linux-based VM.
#
# General steps are:
# 1. Set up Java, which templates and tests are written in
# 2. Set up Go, which our CI/CD programs are written in
# 3. Build everything under cicd/cmd
# 4. Gets all the changed files

name: 'Setup Environment'
description: 'Sets up common environment for Dataflow Templates workflows'

inputs:
java-cache-key:
type: string
description: 'Key to use for the cache entry'
required: false
default: ''
java-version:
type: string
description: 'The version of Java to install'
required: false
default: '11'
go-version:
type: string
description: 'The version of Go to install'
required: false
default: '1.21'
python-version:
type: string
description: 'The version of Python to install'
required: false
default: '3.11'

runs:
using: 'composite'
steps:
- name: Setup Go
uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
with:
go-version: ${{ inputs.go-version }}
cache: false
# It shouldn't take too long to build all of this, and it will at least
# make running the target program easier
- name: Build CI/CD
shell: bash
run: |
cd cicd/
for CMD in $(ls cmd); do
go build ./cmd/$CMD
done
cd ..
- name: Setup Java
uses: ./.github/actions/setup-java-env
with:
cache-key: ${{ inputs.java-cache-key }}
java-version: ${{ inputs.java-version }}
- name: Setup Python
uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d
with:
python-version: ${{ inputs.python-version }}
2 changes: 1 addition & 1 deletion cicd/cmd/run-unit-tests/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func main() {
mvnFlags.SkipIntegrationTests(),
mvnFlags.FailAtTheEnd(),
mvnFlags.ThreadCount(8),
mvnFlags.InternalMaven())
mvnFlags.InternalMaven()),
mvnFlags.SurefireConsoleOutput(), // Add console output
mvnFlags.FullStackTrace(), // Add full stack traces
mvnFlags.TestRetryCount(2)
Expand Down

0 comments on commit 8d6e777

Please sign in to comment.