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

Caraya Tests CI-CD #39

Open
wants to merge 9 commits into
base: ci-cd
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
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"image": "ghcr.io/vipm-io/actions-runner-labview-2024-linux:main",
"remoteUser": "labview",
"remoteEnv": {
"USER": "labview"
},
"postStartCommand": "nohup bash -c 'init_labview && labview &' >/dev/null 2>&1",
"forwardPorts": [6080],
"customizations": {
"vscode": {
"settings": {
"remote.autoForwardPorts": false,
"remote.portsAttributes": {
"6080": {
"label": "desktop",
"onAutoForward": "notify"
}
},
"remote.otherPortsAttributes": {"onAutoForward": "silent"}
}
}
}
}
90 changes: 89 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1 +1,89 @@
#This is the beginnings of a file for doing the automated CI-CD workflows
name: ci-checks

on:
push:
branches:
- main
- develop
- ci-cd
workflow_dispatch:

env:
LABVIEW_VERSION: 24.0
LABVIEW_BITNESS: 64
DOCKER_USER: "runner"
USER: "labview"

jobs:

caraya-tests:

runs-on:
- ubuntu-latest

container:
image: ghcr.io/vipm-io/actions-runner-labview-2024-linux:dev
options: --user root
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}

steps:

- run: git config --global --add safe.directory /__w/labview-icon-editor/labview-icon-editor

- uses: actions/checkout@v4
with:
clean: false
set-safe-directory: false
persist-credentials: false

- name: Caraya Tests
shell: bash
run: |
echo "Applying VIPC Starting Display..."
init_labview || true
dragon vipm activate --serial-number ${{ secrets.VIPM_SERIAL_NUMBER }} --email jim.kring@jki.net --name "Jim Kring" --company JKI --timeout 600
echo "Refreshing Package List..."
dragon refresh --vipm
echo "Applying VIPC file..."
dragon vipm apply-vipc --labview-version ${{ env.LABVIEW_VERSION }} --labview-bitness ${{ env.LABVIEW_BITNESS }} --timeout 600 ./Tooling/Caraya.vipc
if [ -f "./Tooling/coverage.vi" ]; then
echo "Calculating Test Coverage..."
g-cli --timeout 600000 "./Tooling/coverage.vi"
fi
echo "Running unit tests..."
g-cli --timeout 600000 Caraya -- -s "tests" -x "report.xml" -v true -r true

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: caraya-test-report
path: |
./report.xml
./codecov.json

- name: Caraya Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
check_name: Caraya Test Report
report_paths: report.xml

- run: |
# these files mess up the codecov report uploader, so remove them
rm -f report.xml
rm -f "build support/coverage.vi"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CI: true
with:
# fail_ci_if_error: true # optional (default = false)
# name: codecov-umbrella # optional
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
verbose: true # optional (default = false)
flags: unittests
files: "./codecov.json"
Binary file added Tooling/Caraya.vipc
Binary file not shown.