Skip to content

Fed-BioMed Build test #1109

Fed-BioMed Build test

Fed-BioMed Build test #1109

Workflow file for this run

name: Fed-BioMed Build test
run-name: Fed-BioMed Build test
on:
pull_request:
types:
- opened
- synchronize
- reopened
- closed
- review_requested
- ready_for_review
branches:
- master
- develop
- 'feature/479-bug-in-integration-test' # \todo To remove when merging.
jobs:
build-doc:
name: Test documentation build
runs-on: ubuntu-latest
# if: ${{ github.event_name == 'push' || github.event.pull_request.opened == true }}
if: github.event.pull_request.draft == false
steps:
- name: Checkout to repository
uses: actions/checkout@v3
- name: Detect documentation changes
uses: dorny/paths-filter@master
id: filter
with:
filters: |
docs:
- 'fedbiomed/**'
- 'scripts/docs/**'
- 'docs/**'
- 'envs/development/**'
- 'envs/build/**'
- 'mkdocs.yml'
- 'README.md'
- name: Setup python
if: steps.filter.outputs.docs == 'true'
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Dependencies
if: steps.filter.outputs.docs == 'true'
run: pip install -r envs/build/docs-requirements.txt
- name: Build documentation
if: steps.filter.outputs.docs == 'true'
# Version number for testing purposes should respect to standart which is vMajor.Minor.Patch
run: scripts/docs/fedbiomed_doc.sh --build-dir build-repo --build-main --build-current-as v1.0.1
unit-test:
name: unit tests
strategy:
fail-fast: false
matrix:
os: [ubuntu-22-04, fedora38, macosx-m1]
runs-on: ${{ matrix.os }}
if: github.event.pull_request.draft == false
steps:
- name: Checkout to commit
uses: actions/checkout@v3
- name: Filter module related changes
uses: dorny/paths-filter@master
id: filter
with:
filters: |
module:
- 'fedbiomed/**'
- 'scripts/**'
- 'tests/**'
- 'envs/development/conda/**'
- 'envs/build/**'
- 'modules/**'
- 'MP-SPDZ/**'
- '.github/**'
- name: Run unit tests
id: unit-test
uses: ./.github/actions/unit-tests
if: steps.filter.outputs.module == 'true'
with:
test-dir: tests
- name: Upload coverage reports to Codecov
if: steps.filter.outputs.module == 'true' && matrix.os != 'macosx-m1'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: tests/coverage.xml
flags: unittests-${{ matrix.os }} # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: true # optional (default = false)
- name: Notify upload impossible on m1
if: steps.filter.outputs.module == 'true' && matrix.os == 'macosx-m1'
run: |
echo "No codecov-action available for macos-m1" # to check from time to time
mnist-test:
name: Test MNIST Notebook
strategy:
fail-fast: false
matrix:
os: [ubuntu-22-04, fedora38, macosx-m1]
runs-on: ${{ matrix.os }}
needs: unit-test
if: github.event.pull_request.draft == false
steps:
- name: Checkout to commit
uses: actions/checkout@v3
- name: Filter module related changes
uses: dorny/paths-filter@master
id: filter
with:
filters: |
module:
- 'fedbiomed/**'
- 'scripts/**'
- 'envs/development/conda/**'
- 'notebooks/**'
- '.github/**'
- name: Run MNIST Test - Master
if: steps.filter.outputs.module == 'true'
run: |
source ~/.bashrc
./scripts/configure_conda node
./scripts/run_test_mnist ../../../..
shell: bash -l {0}