generated from StanfordSpezi/SpeziTemplateApplication
-
-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (97 loc) · 3.44 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#
# This source file is part of the PAWS application based on the Stanford Spezi Template Application project
#
# SPDX-FileCopyrightText: 2023 Stanford University
#
# SPDX-License-Identifier: MIT
#
name: Build and Test
on:
pull_request:
workflow_dispatch:
workflow_call:
jobs:
reuse_action:
name: REUSE Compliance Check
uses: StanfordBDHG/.github/.github/workflows/reuse.yml@v2
permissions:
contents: read
swiftlint:
name: SwiftLint
uses: StanfordBDHG/.github/.github/workflows/swiftlint.yml@v2
permissions:
contents: read
markdownlinkcheck:
name: Markdown Link Check
uses: StanfordBDHG/.github/.github/workflows/markdown-link-check.yml@v2
permissions:
contents: read
buildandtest:
name: Build and Test
uses: StanfordBDHG/.github/.github/workflows/xcodebuild-or-fastlane.yml@v2
permissions:
contents: read
with:
artifactname: PAWS.xcresult
runsonlabels: '["macOS", "self-hosted"]'
setupfirebaseemulator: true
customcommand: "npm install --prefix ./functions && firebase emulators:exec --import=./firebase 'fastlane test'"
uploadcoveragereport:
name: Upload Coverage Report
needs: buildandtest
uses: StanfordBDHG/.github/.github/workflows/create-and-upload-coverage-report.yml@v2
permissions:
contents: read
with:
coveragereports: PAWS.xcresult
secrets:
token: ${{ secrets.CODECOV_TOKEN }}
buildandtestdatapipelinenotebook:
name: Build and Test ECG Data pipeline Notebook
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
- name: Setup NodeJS
uses: actions/setup-node@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'microsoft'
java-version: '17'
- name: Setup LaTex
run: |
sudo apt-get update -y
sudo apt-get install -y --no-install-recommends pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic || true
if ! dpkg -l pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic; then
sudo apt-get update --fix-missing
sudo apt-get install -y pandoc texlive-xetex texlive-fonts-recommended texlive-plain-generic
fi
- name: Cache Firebase Emulators
uses: actions/cache@v3
with:
path: ~/.cache/firebase/emulators
key: ${{ runner.os }}-${{ runner.arch }}-firebase-emulators-${{ hashFiles('~/.cache/firebase/emulators/**') }}
- name: Install Firebase CLI Tools
run: npm install -g firebase-tools
- name: Install Infrastructure
run: |
python -m pip install --upgrade pip
pip install jupyterlab
- name: Install ECGDataPipelineTemplate Dependencies
run: |
pip install pandas numpy matplotlib firebase-admin requests ipywidgets pytz
- name: Set Firestore Emulator Environment Variable
run: |
echo "FIRESTORE_EMULATOR_HOST=localhost:8080" >> $GITHUB_ENV
echo "GCLOUD_PROJECT=ecgdatapipelinetemplate" >> $GITHUB_ENV
- name: Run Firebase Emulator & Execute Notebook
run: |
firebase emulators:exec --import=./ECGDataPipelineTemplate/sample_data "jupyter nbconvert --to pdf --execute ./ECGDataPipelineTemplate/ECGDataPipelineTemplate.ipynb"
env:
CI: true
- uses: actions/upload-artifact@v4
with:
name: ECGDataPipelineTemplate.pdf
path: ECGDataPipelineTemplate.pdf