Skip to content

Notes from roadmap meeting #374

Notes from roadmap meeting

Notes from roadmap meeting #374

Workflow file for this run

name: CI
# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches:
- main
tags:
- v*.*.*
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
name: Run Python lint and type checks
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: 3.9
cache: pip
cache-dependency-path: |
packages/chassisml/pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ./packages/chassisml[test]
- name: Lint
run: tox -e lint
- name: Verify Types
run: tox -e type
tests:
name: Run tests for ${{ matrix.os }}/${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
include:
- python-version: "3.8"
tox-name: py38
- python-version: "3.9"
tox-name: py39
- python-version: "3.10"
tox-name: py310
- python-version: "3.11"
tox-name: py311
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
cache: pip
cache-dependency-path: |
packages/chassisml/pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ./packages/chassisml[test]
- name: Run tests
run: |
tox -e ${{ matrix.tox-name }}
pip:
name: Build and publish SDK to PyPI
needs: [lint, tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
cache: pip
cache-dependency-path: |
packages/chassisml/pyproject.toml
- name: Install pypa/build
run: |
pip install build
- name: Build distribution
run: |
python3 -m build --sdist --wheel --outdir dist/ packages/chassisml
# - name: Publish distribution to PyPI
# if: startsWith(github.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# password: ${{ secrets.PYPI_API_TOKEN }}
docs:
name: Update docs
needs: [lint, tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: pip
cache-dependency-path: |
packages/chassisml/pyproject.toml
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip install ./packages/chassisml[docs]
- name: Build docs
run: |
tox -e docs
# - name: Publish docs
# if: startsWith(github.ref, 'refs/tags')
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: /home/runner/work/chassis/build/docs
container-images:
name: Build container images
needs: [lint, tests]
runs-on: ubuntu-latest
steps:
- name: Set tag value
run: |
if [ '${{github.ref_type}}' = 'tag' ]; then
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
else
echo "RELEASE_VERSION=build-$GITHUB_SHA" >> $GITHUB_ENV
fi
- name: Checkout
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push remote build server
uses: docker/build-push-action@v4
with:
context: ./servers/remote-build
push: true
tags: |
ghcr.io/${{ github.repository }}-build-server:${{ env.RELEASE_VERSION }}
ghcr.io/${{ github.repository }}-build-server:latest
cache-from: type=gha
cache-to: type=gha,mode=max
helm:
name: Publish Helm chart
needs: [container-images]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
# Fetch all branches/tags. This is needed to so that it can commit
# to the `gh-pages` branch.
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
# When we don't pass a token, we get a warning annotation in the build
# result about missing a token but it still works by downloading the
# latest hard-coded version. This should be fine, but if at any point
# we want that warning annotation to go away, then simply uncomment the
# following two lines.
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"