Organizes 11 projects for Cerbo GX/Venus OS into a single repository: - axiom-nmea: Raymarine LightHouse protocol decoder - dbus-generator-ramp: Generator current ramp controller - dbus-lightning: Blitzortung lightning monitor - dbus-meteoblue-forecast: Meteoblue weather forecast - dbus-no-foreign-land: noforeignland.com tracking - dbus-tides: Tide prediction from depth + harmonics - dbus-vrm-history: VRM cloud history proxy - dbus-windy-station: Windy.com weather upload - mfd-custom-app: MFD app deployment package - venus-html5-app: Custom Victron HTML5 app fork - watermaker: Watermaker PLC control UI Adds root README, .gitignore, project template, and per-project .gitignore files. Sensitive config files excluded via .gitignore with .example templates provided. Made-with: Cursor
96 lines
3.1 KiB
YAML
96 lines
3.1 KiB
YAML
name: Continous Integration Workflow
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup Node.js 20.x
|
|
uses: actions/setup-node@master
|
|
with:
|
|
node-version: 20.x
|
|
- name: Node modules cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.npm
|
|
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Install the dependencies
|
|
run: npm ci
|
|
- name: Build the bundle for testing
|
|
run: npm run build
|
|
env:
|
|
PUBLIC_URL: /
|
|
REACT_APP_ENABLE_LANG_OVERRIDE: false
|
|
- name: Serve the application
|
|
run: npm run serve &
|
|
- name: Run the Venus simulation
|
|
run: >
|
|
docker run -d --rm -p 9001:9001 -p 1883:1883 -p 3000:3000 -p 8080:80
|
|
--name venus-docker victronenergy/venus-docker:latest
|
|
/root/run_with_simulation.sh z
|
|
- name: Run unit and E2E tests
|
|
run: npm run test:ci
|
|
- name: Generate E2E Report
|
|
run: npm run generate-e2e-report
|
|
if: always()
|
|
- name: Upload E2E Results
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: e2e-tests-results
|
|
path: cypress/results/results.json
|
|
- name: Upload E2E Report
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: e2e-tests-report
|
|
path: cypress/report
|
|
- name: Upload Cypress Screenshots
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: cypress-screenshots
|
|
path: cypress/screenshots
|
|
- name: Upload Cypress Videos
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: cypress-videos
|
|
path: cypress/videos
|
|
- name: Check Tag
|
|
id: check_tag
|
|
run: |
|
|
if [[ ${{ github.event.ref }} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
|
echo ::set-output name=match::true
|
|
fi
|
|
- name: Build the production bundle
|
|
if: steps.check_tag.outputs.match == 'true'
|
|
run: npm run build
|
|
env:
|
|
PUBLIC_URL: /app
|
|
REACT_APP_ENABLE_LANG_OVERRIDE: false
|
|
- name: Archive bundle
|
|
if: steps.check_tag.outputs.match == 'true'
|
|
run: tar -zcvf venus-html5-app-${{ github.ref_name }}.tar.gz dist/
|
|
- name: Create Release
|
|
id: create_release
|
|
if: steps.check_tag.outputs.match == 'true'
|
|
uses: actions/create-release@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
tag_name: ${{ github.ref }}
|
|
release_name: Release ${{ github.ref }}
|
|
draft: true
|
|
- name: Upload Release Archive
|
|
if: steps.check_tag.outputs.match == 'true'
|
|
uses: actions/upload-release-asset@v1.0.1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: ./venus-html5-app-${{ github.ref_name }}.tar.gz
|
|
asset_name: venus-html5-app-${{ github.ref_name }}.tar.gz
|
|
asset_content_type: application/zip
|