- CitrineOS core extracted (CSMS OCPP 2.0.1) - OpenOCPP extracted (firmware OCPP 1.6J/2.0.1) - ShapeShifter library installed (pip install -e) - ShapeShifter specification extracted - EVerest extracted TODO updated with progress
87 lines
2.4 KiB
YAML
87 lines
2.4 KiB
YAML
# SPDX-FileCopyrightText: 2025 Contributors to the CitrineOS Project
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
name: Test Server on Pull Request
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
changes:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
server: ${{ steps.filter.outputs.server }}
|
|
shared: ${{ steps.filter.outputs.shared }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dorny/paths-filter@v3
|
|
id: filter
|
|
with:
|
|
filters: |
|
|
shared:
|
|
- 'pnpm-lock.yaml'
|
|
- 'pnpm-workspace.yaml'
|
|
- 'package.json'
|
|
- 'tsconfig*.json'
|
|
- '.github/workflows/**'
|
|
server:
|
|
- 'apps/Server/**'
|
|
- 'packages/**'
|
|
|
|
build:
|
|
needs: changes
|
|
if: ${{ needs.changes.outputs.server == 'true' || needs.changes.outputs.shared == 'true' }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '24.16.0'
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Build and Run Docker Compose
|
|
run: docker compose -f ${{ github.workspace }}/apps/Server/docker-compose.yml up -d
|
|
|
|
- name: Install Newman
|
|
run: |
|
|
npm install -g newman
|
|
sleep 10
|
|
|
|
- name: Integration test
|
|
run: |
|
|
RETRY_COUNT=0
|
|
MAX_RETRIES=5
|
|
RETRY_DELAY=10
|
|
until [ $RETRY_COUNT -ge $MAX_RETRIES ]
|
|
do
|
|
newman run ${{ github.workspace }}/.github/workflows/tests/CI/collection.json -e ${{ github.workspace }}/.github/workflows/tests/CI/environment.json --reporters cli && break
|
|
RETRY_COUNT=$((RETRY_COUNT+1))
|
|
echo "Retry $RETRY_COUNT/$MAX_RETRIES in $RETRY_DELAY seconds..."
|
|
sleep $RETRY_DELAY
|
|
done
|
|
shell: bash
|
|
|
|
- name: Get logs for all containers
|
|
if: failure()
|
|
run: |
|
|
docker ps -a
|
|
docker container ls -aq | xargs -I {} docker logs {}
|
|
|
|
- name: Clean up
|
|
run: docker compose -f ${{ github.workspace }}/apps/Server/docker-compose.yml down
|