Skip to content

Commit

Permalink
added missing tray dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
parvit committed Sep 10, 2024
1 parent 862f61a commit b48469c
Showing 1 changed file with 70 additions and 77 deletions.
147 changes: 70 additions & 77 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ run-name: Code Integration [${{ github.event_name }}][${{ github.head_ref || git

jobs:
docs:
if: false
if: true
runs-on: ubuntu-latest
defaults:
run:
Expand Down Expand Up @@ -77,10 +77,10 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

# - name: Set up CMake
# uses: jwlawson/[email protected]
# with:
# cmake-version: ${{ env.CMAKE_VERSION }}
- name: Set up CMake
uses: jwlawson/[email protected]
with:
cmake-version: ${{ env.CMAKE_VERSION }}

- name: Prepare
run: |
Expand All @@ -89,88 +89,81 @@ jobs:
mkdir -p cover
mkdir -p report
mkdir -p unit
go install github.com/jstemmer/[email protected]
go install github.com/axw/gocov/[email protected]
go install github.com/matm/gocov-html/cmd/[email protected]
go install github.com/AlekSi/[email protected]
# - name: Build Backends
# run: |
# cd backend/
# go generate
#
# - name: Build QPep
# run: |
# go build -v -o build/qpep
- name: Build Backends
run: |
cd backend/
go generate
- name: Build QPep
run: |
go build -v -o build/qpep
- name: Build QPep Tray
run: |
pushd qpep-tray
set CGO_ENABLED=0
go build -o ../build/qpep-tray
popd
# - uses: actions/upload-artifact@v4
# with:
# name: qpep_linux_b${{ github.run_id }}
# path: build/
#
# - name: Prepare Tests
# run: |
# mkdir -p unit/
# mkdir -p cover/
# mkdir -p report/
# go install github.com/jstemmer/[email protected]
# go install github.com/axw/gocov/[email protected]
# go install github.com/matm/gocov-html/cmd/[email protected]
# go install github.com/AlekSi/[email protected]
#
# - name: Test
# run: |
# set -x
# for i in $(go list ./... | grep -E -v "${IGNORE_PACKAGES}" | sed -n -e 's|github.com\/parvit\/qpep\/||p')
# do
# pushd $i
# export WORKSPACE="${{ github.workspace }}"
# go test -v -gcflags=-l -cover -c -o qpep.$(basename $PWD).test &> /dev/null || true
# ./qpep.$(basename $PWD).test -test.v -test.timeout 5m -test.coverprofile=$WORKSPACE/cover/$(basename $PWD).out &> unit_tests.out || true
# grep -E "PASS|FAIL|SKIP" unit_tests.out || true
# cat unit_tests.out | go-junit-report > $WORKSPACE/unit/$(basename $PWD).xml
# popd
# done
# continue-on-error: true
#
# - name: Publish Coverage Results
# if: always()
# run: |
# for i in $(go list ./... | grep -E -v "${IGNORE_PACKAGES}" | sed -n -e 's|github.com\/parvit\/qpep\/||p')
# do
# pushd $i
# echo "=== Package $i ===" >> $GITHUB_STEP_SUMMARY
# gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov report | grep "Coverage" >> $GITHUB_STEP_SUMMARY || true
# echo >> $GITHUB_STEP_SUMMARY
# gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov-html > ${{ github.workspace }}/report/$(basename $PWD).html || true
# popd
# done
# continue-on-error: true
#
# - name: Publish Test Results
# uses: EnricoMi/publish-unit-test-result-action/linux@v2
# if: always()
# with:
# check_name: "Unit Tests - Linux Platform"
# junit_files: "unit/*.xml"
#
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: linux_cover_output
# path: "cover/*.out"
#
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: linux_coverage_report
# path: "report/*.html"
- uses: actions/upload-artifact@v4
with:
name: qpep_linux_b${{ github.run_id }}
path: build/

- name: Test
run: |
set -x
for i in $(go list ./... | grep -E -v "${IGNORE_PACKAGES}" | sed -n -e 's|github.com\/parvit\/qpep\/||p')
do
pushd $i
export WORKSPACE="${{ github.workspace }}"
go test -v -gcflags=-l -cover -c -o qpep.$(basename $PWD).test &> /dev/null || true
./qpep.$(basename $PWD).test -test.v -test.timeout 5m -test.coverprofile=$WORKSPACE/cover/$(basename $PWD).out &> unit_tests.out || true
grep -E "PASS|FAIL|SKIP" unit_tests.out || true
cat unit_tests.out | go-junit-report > $WORKSPACE/unit/$(basename $PWD).xml
popd
done
continue-on-error: true

- name: Publish Coverage Results
if: always()
run: |
for i in $(go list ./... | grep -E -v "${IGNORE_PACKAGES}" | sed -n -e 's|github.com\/parvit\/qpep\/||p')
do
pushd $i
echo "=== Package $i ===" >> $GITHUB_STEP_SUMMARY
gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov report | grep "Coverage" >> $GITHUB_STEP_SUMMARY || true
echo >> $GITHUB_STEP_SUMMARY
gocov convert ${{ github.workspace }}/cover/$(basename $PWD).out | gocov-html > ${{ github.workspace }}/report/$(basename $PWD).html || true
popd
done
continue-on-error: true

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action/linux@v2
if: always()
with:
check_name: "Unit Tests - Linux Platform"
junit_files: "unit/*.xml"

- uses: actions/upload-artifact@v4
if: always()
with:
name: linux_cover_output
path: "cover/*.out"

- uses: actions/upload-artifact@v4
if: always()
with:
name: linux_coverage_report
path: "report/*.html"

build-windows:
if: false
if: true
runs-on: windows-latest
env:
GO_VERSION: 1.20.14
Expand Down

0 comments on commit b48469c

Please sign in to comment.