feat(slimfaas): add dashboard #491
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: SlimFaas main external contrib CI | |
| on: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened] | |
| permissions: | |
| contents: read | |
| env: | |
| PNPM_VERSION: 10.3.0 | |
| NODE_VERSION: 24 | |
| jobs: | |
| unit_tests: | |
| name: Unit Tests | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]') | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - uses: actions/setup-dotnet@v3 | |
| with: | |
| global-json-file: global.json | |
| - name: Run unit tests | |
| run: | | |
| dotnet test --collect "Code Coverage;Format=cobertura" --verbosity normal | |
| - name: ReportGenerator | |
| uses: danielpalme/ReportGenerator-GitHub-Action@5.4.4 | |
| with: | |
| reports: './**/TestResults/**/*.cobertura.xml' | |
| targetdir: 'coveragereport' | |
| reporttypes: 'MarkdownSummaryGithub' | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| - uses: pnpm/action-setup@v2 | |
| name: Install pnpm | |
| with: | |
| version: ${{ env.PNPM_VERSION }} | |
| run_install: false | |
| - name: pnpm ci | |
| run: pnpm i --frozen-lockfile | |
| working-directory: ./src/SlimFaasPlanetSaver | |
| - name: pnpm run coverage | |
| run: pnpm run coverage | |
| working-directory: ./src/SlimFaasPlanetSaver | |
| - name: Publish coverage in build summary # Only applicable if 'MarkdownSummaryGithub' or one of the other Markdown report types is generated | |
| run: cat coveragereport/SummaryGithub.md >> $GITHUB_STEP_SUMMARY # Adjust path and filename if necessary | |
| shell: bash | |
| # Exemple de job PR pour builder les images sans push | |
| build_docker_images: | |
| if: github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]') | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - name: slimfaas | |
| context: "." | |
| file: "./Dockerfile" | |
| platforms: "linux/amd64,linux/arm64" | |
| - name: fibonacci-api | |
| context: "./src/Fibonacci" | |
| file: "./src/Fibonacci/Dockerfile" | |
| - name: slimfaas-mcp | |
| context: "./src/SlimFaasMcp" | |
| file: "./src/SlimFaasMcp/Dockerfile" | |
| platforms: "linux/amd64,linux/arm64" | |
| - name: fibonacci-batch | |
| context: "./src/FibonacciBatch" | |
| file: "./src/FibonacciBatch/Dockerfile" | |
| - name: fibonacci-webapp | |
| context: "./src/FibonacciReact" | |
| file: "./src/FibonacciReact/Dockerfile" | |
| steps: | |
| - name: Call reusable Docker build (no push) | |
| uses: ./.github/workflows/Docker.yml | |
| with: | |
| image_name: axaguildev/${{ matrix.name }} | |
| image_version: pr-${{ github.event.number }}.${{ github.run_number }} | |
| image_build_args: "" | |
| image_context: ${{ matrix.context }} | |
| image_file: ${{ matrix.file }} | |
| platforms: ${{ matrix.platforms || 'linux/amd64' }} | |
| push: false | |
| site_build: | |
| if: github.event_name == 'pull_request' && (github.event.pull_request.head.repo.fork == true || github.actor == 'dependabot[bot]') | |
| uses: ./.github/workflows/SiteBuild.yml |