Skip to content

Update release year in versions #196

Update release year in versions

Update release year in versions #196

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI-CD
on: push
env:
PROJECT_ROOT: ${{ github.workspace }}
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", "windows-2019"]
python-version: ["3.9", "3.10", "3.11"]
exclude:
# Due to nbconvert TypeError
- os: windows-latest
python-version: "3.7"
# Due to nbconvert TypeError
- os: windows-2019
python-version: "3.7"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-python@v4"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install package dependencies"
run: |
python -VV
python -m site
python -m pip install --upgrade pip setuptools wheel
python -m pip install --upgrade coverage[toml] virtualenv tox tox-gh-actions
python -m pip install -r requirements.txt
python -m pip install .
- name: "Run package tests for ${{ matrix.python-version }}, ${{ matrix.os }}"
run: "python -m pytest -vv -m 'not latex and not notebook'"
- name: "Run notebook tests for ${{ matrix.python-version }} if ubuntu os"
run: |
echo "${{ matrix.os }}"
sudo apt-get install graphviz
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 }}"
brew install graphviz
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 }}"
choco install graphviz
python -m pytest -vv -m notebook
if: matrix.os == 'windows-latest'
- name: "Run latex tests for ${{ matrix.python-version }} if ubuntu os"
run: |
echo "${{ matrix.os }}"
sudo apt-get install texlive-latex-extra
python -m pytest -vv -m latex
if: matrix.os == 'ubuntu-latest'
deliver:
runs-on: ubuntu-latest
needs: tests
steps:
- name: Checkout repository
uses: actions/checkout@v2
- uses: "actions/checkout@v2"
- uses: "actions/setup-python@v2"
with:
python-version: "${{ matrix.python-version }}"
- name: "Install dependencies for latex slide delivery"
run: |
sudo apt-get install texlive-latex-extra
python -VV
python -m site
python -m pip install .
- name: "Create slides"
run: |
mkdir -p tex_out
python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/intro/ai-risk-and-discrete-geometry.tex --outdir ${{ github.workspace }}/tex_out
python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/discrete-geometry/discrete-geometry.tex --outdir ${{ github.workspace }}/tex_out
python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/correlation-causality/correlation-causality.tex --outdir ${{ github.workspace }}/tex_out
python risk_learning/tex.py --filepath ${{ github.workspace }}/slides/adversarial-regularization-regimes/adversarial.tex --outdir ${{ github.workspace }}/tex_out
cd tex_out
ls -al
- name: "Archive slide artifacts"
uses: actions/upload-artifact@v3
with:
name: risk-ai-slides
path: ${{ github.workspace }}/tex_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 }}/tex_out/*.pdf