|
| 1 | +name: Testing |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + lint: |
| 7 | + |
| 8 | + runs-on: ubuntu-latest |
| 9 | + strategy: |
| 10 | + max-parallel: 40 |
| 11 | + matrix: |
| 12 | + check: [CHANGELOG, WHITESPACE, STYLE] |
| 13 | + python-version: [3.7] |
| 14 | + |
| 15 | + steps: |
| 16 | + - uses: actions/checkout@v1 |
| 17 | + - name: Set up Python ${{ matrix.python-version }} |
| 18 | + uses: actions/setup-python@v1 |
| 19 | + with: |
| 20 | + python-version: ${{ matrix.python-version }} |
| 21 | + - name: Install dependencies |
| 22 | + run: | |
| 23 | + python -m pip install --upgrade pip |
| 24 | + pip install -U -e .[dev] |
| 25 | + - name: Run check |
| 26 | + run: | |
| 27 | + ${{ matrix.check }}=1 ./.ci/run.sh |
| 28 | +
|
| 29 | + test: |
| 30 | + |
| 31 | + runs-on: ubuntu-latest |
| 32 | + strategy: |
| 33 | + max-parallel: 40 |
| 34 | + matrix: |
| 35 | + plugin: [., examples/shouldi, model/tensorflow, model/scratch, model/scikit, source/mysql, feature/git, feature/auth, service/http] |
| 36 | + python-version: [3.7] |
| 37 | + |
| 38 | + steps: |
| 39 | + - uses: actions/checkout@v1 |
| 40 | + - name: Set up Python ${{ matrix.python-version }} |
| 41 | + uses: actions/setup-python@v1 |
| 42 | + with: |
| 43 | + python-version: ${{ matrix.python-version }} |
| 44 | + - name: Install dependencies |
| 45 | + run: | |
| 46 | + mkdir -p ~/.local/bin |
| 47 | + python -m pip install --upgrade pip |
| 48 | + pip install -U -e .[dev] |
| 49 | + if [ "${{ matrix.plugin }}" == "feature/git" ]; then |
| 50 | + curl -sSL https://github.com/XAMPPRocky/tokei/releases/download/v9.1.1/tokei-v9.1.1-x86_64-unknown-linux-gnu.tar.gz | tar xvz -C "$HOME/.local/bin/" |
| 51 | + sudo apt-get update && sudo apt-get install -y git subversion cloc openssl |
| 52 | + fi |
| 53 | + if [ "${{ matrix.plugin }}" == "source/mysql" ]; then |
| 54 | + curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
| 55 | + sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" |
| 56 | + sudo apt-get update && sudo apt-get install -y docker-ce docker-ce-cli containerd.io |
| 57 | + docker pull mariadb:10 |
| 58 | + fi |
| 59 | + - name: Test |
| 60 | + run: | |
| 61 | + export PATH="${HOME}/.local/bin:${PATH}" |
| 62 | + PLUGIN=${{ matrix.plugin }} LOGGING=debug ./.ci/run.sh |
| 63 | + if [ "x${{ matrix.plugin }}" = "x." ]; then |
| 64 | + CODECOV_TOKEN=${{ secrets.CODECOV_TOKEN }} codecov |
| 65 | + fi |
0 commit comments