Skip to content

Simplify E2E tests with matrix #588

Simplify E2E tests with matrix

Simplify E2E tests with matrix #588

Workflow file for this run

name: E2E
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
FLWR_TELEMETRY_ENABLED: 0
jobs:
e2e:
runs-on: ubuntu-22.04
timeout-minutes: 10
# Using approach described here:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
strategy:
matrix:
include:
- directory: bare
- directory: jax
- directory: pytorch
dataset: |
from torchvision.datasets import CIFAR10
CIFAR10('./data', download=True)
- directory: tensorflow
dataset: |
import tensorflow as tf
tf.keras.datasets.cifar10.load_data()
- directory: opacus
dataset: |
from torchvision.datasets import CIFAR10
CIFAR10('./data', download=True)
- directory: mxnet
dataset: |
import mxnet as mx
mx.test_utils.get_mnist()
- directory: scikit-learn
dataset: |
import openml
openml.datasets.get_dataset(554)
- directory: fastai
dataset: |
from fastai.vision.all import untar_data, URLs
untar_data(URLs.MNIST)
- directory: pandas
dataset: |
from pathlib import Path
from sklearn.datasets import load_iris
Path('data').mkdir(exist_ok=True)
load_iris(as_frame=True)['data'].to_csv('./data/client.csv')
name: ${{matrix.directory}}
defaults:
run:
working-directory: e2e/${{ matrix.directory }}
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
with:
python-version: 3.8
- name: Install dependencies
run: python -m poetry install
- name: Download dataset
if: ${{matrix.dataset}}
run: python -c "${{ matrix.dataset }}"
- name: Run edge client test
run: ./test.sh
- name: Run virtual client test
run: python simulation.py