mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-03-04 11:23:10 +00:00
- Adds cbindings tests to the makefile so they can be run locally, eg with make testLibstorage or make testAll - Remove the separate workflow for running these tests in ci, opting instead to run them along with unit and integration tests
78 lines
2.2 KiB
YAML
78 lines
2.2 KiB
YAML
name: Reusable - CI
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
matrix:
|
|
type: string
|
|
cache_nonce:
|
|
default: '0'
|
|
description: Allows for easily busting actions/cache caches
|
|
required: false
|
|
type: string
|
|
|
|
env:
|
|
cache_nonce: ${{ inputs.cache_nonce }}
|
|
|
|
jobs:
|
|
build:
|
|
strategy:
|
|
matrix:
|
|
include: ${{ fromJson(inputs.matrix) }}
|
|
|
|
defaults:
|
|
run:
|
|
shell: ${{ matrix.shell }} {0}
|
|
|
|
name: ${{ matrix.os }}-${{ matrix.tests }}-${{ matrix.cpu }}-${{ matrix.nim_version }}-${{ matrix.job_number }}
|
|
runs-on: ${{ matrix.builder }}
|
|
timeout-minutes: 90
|
|
steps:
|
|
- name: Checkout sources
|
|
uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
|
|
- name: Setup Nimbus Build System
|
|
uses: ./.github/actions/nimbus-build-system
|
|
with:
|
|
os: ${{ matrix.os }}
|
|
cpu: ${{ matrix.cpu }}
|
|
shell: ${{ matrix.shell }}
|
|
nim_version: ${{ matrix.nim_version }}
|
|
coverage: false
|
|
|
|
## Part 1 Tests ##
|
|
- name: Unit tests
|
|
if: matrix.tests == 'unittest' || matrix.tests == 'all'
|
|
run: make -j${ncpu} test
|
|
|
|
## Part 2 Tests ##
|
|
- name: Integration tests
|
|
if: matrix.tests == 'integration' || matrix.tests == 'all'
|
|
env:
|
|
CODEX_INTEGRATION_TEST_INCLUDES: ${{ matrix.includes }}
|
|
run: make -j${ncpu} DEBUG=${{ runner.debug }} testIntegration
|
|
|
|
- name: Upload integration tests log files
|
|
uses: actions/upload-artifact@v4
|
|
if: (matrix.tests == 'integration' || matrix.tests == 'all') && always()
|
|
with:
|
|
name: ${{ matrix.os }}-${{ matrix.cpu }}-${{ matrix.nim_version }}-${{ matrix.job_number }}-integration-tests-logs
|
|
path: tests/integration/logs/
|
|
retention-days: 1
|
|
|
|
## Part 3 Tests ##
|
|
- name: Libstorage tests
|
|
if: matrix.tests == 'libstorage' || matrix.tests == 'all'
|
|
run: make -j${ncpu} testLibstorage
|
|
|
|
status:
|
|
if: always()
|
|
needs: [build]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') || contains(needs.*.result, 'skipped') }}
|
|
run: exit 1
|