-
Notifications
You must be signed in to change notification settings - Fork 9
84 lines (79 loc) · 2.89 KB
/
Copy pathci-cd.yml
File metadata and controls
84 lines (79 loc) · 2.89 KB
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
# This is a basic workflow to help you get started with Actions
name: CI-CD
on: push
env:
PROJECT_ROOT: ${{ github.workspace }}
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
tests:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: "actions/checkout@v4"
- uses: "actions/setup-python@v5"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install package dependencies"
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-py${{ matrix.python-version }}.txt
python -m pip install --upgrade pytest nbformat flake8
python -m pip install -e .
- name: "Run notebook tests for ${{ matrix.python-version }} if ubuntu os"
run: |
echo "${{ matrix.os }}"
python -m pytest -vv -m notebook
if: matrix.os == 'ubuntu-latest'
- name: "Run notebook tests for ${{ matrix.python-version }} if mac os"
run: |
echo "${{ matrix.os }}"
python -m pytest -vv -m notebook
if: matrix.os == 'macos-latest'
- name: "Run notebook tests for ${{ matrix.python-version }} if windows os"
run: |
echo "${{ matrix.os }}"
python -m pytest -vv -m notebook
if: matrix.os == 'windows-latest'
deliver:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: "Install Python dependencies"
run: |
python -VV
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-py3.11.txt
python -m pip install -e .
- name: "Install marp"
run: npm install -g @marp-team/marp-cli
- name: "Create slides"
run: |
mkdir -p slides_out
marp --html 'slides/intro/intro.md' -o "${{ github.workspace }}/slides_out/intro.pdf" --allow-local-files
marp --html 'slides/high-risk-ai/high-risk-ai.md' -o "${{ github.workspace }}/slides_out/high-risk-ai.pdf" --allow-local-files
ls -al slides_out
- name: "Archive slide artifacts"
uses: actions/upload-artifact@v4
with:
name: risk-ai-slides
path: ${{ github.workspace }}/slides_out/*.pdf
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
${{ github.workspace }}/slides_out/*.pdf