Skip to content

Add support for LightGBM's non-wrapped Booster #1019

Add support for LightGBM's non-wrapped Booster

Add support for LightGBM's non-wrapped Booster #1019

Workflow file for this run

name: GitHub Actions
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Python ${{ matrix.python }}, Test: ${{ matrix.lang }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
lang:
- "API"
- "c_lang or python or java or go_lang or javascript or php or haskell or ruby or rust"
- "c_sharp or visual_basic or f_sharp"
- "r_lang"
- "elixir"
- "dart or powershell"
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
fetch-depth: 5
- name: Build Docker image
run: docker build . --file Dockerfile -t m2cgen-docker --build-arg python=${{ matrix.python }}
- name: Run tests
run: |
if [[ "${{ matrix.lang }}" == "API" ]]; then
export TEST="API";
else
export TEST="E2E";
fi
docker run \
--ulimit stack=-1 \
-v "$GITHUB_WORKSPACE":"/m2cgen" \
-e TEST \
-e LANG="${{ matrix.lang }}" \
-e GITHUB_ACTIONS \
-e GITHUB_WORKFLOW \
-e GITHUB_RUN_ID \
-e GITHUB_SHA \
-e GITHUB_REF \
-e GITHUB_HEAD_REF \
-e GITHUB_REPOSITORY \
-e GITHUB_SERVER_URL \
-e GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \
m2cgen-docker \
bash /m2cgen/.ci/test.sh
- name: Generate artifact with code examples
if: matrix.python == '3.10' && matrix.lang == 'API'
uses: actions/upload-artifact@v3
with:
name: code_examples
path: ${{ github.workspace }}/generated_code_examples/
if-no-files-found: error
all-successful:
# https://github.community/t/is-it-possible-to-require-all-github-actions-tasks-to-pass-without-enumerating-them/117957/4?u=graingert
runs-on: ubuntu-latest
needs: test
steps:
- name: Note that all tests succeeded
run: echo "🎉"