diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..738731e --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -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"} + } + } + } +} \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b89d785..0dfe77c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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" diff --git a/Tooling/Caraya.vipc b/Tooling/Caraya.vipc new file mode 100644 index 0000000..6eb60cf Binary files /dev/null and b/Tooling/Caraya.vipc differ