Add auto-generated pyi files to Metaflow #3658
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
workflow_call: | |
permissions: read-all | |
jobs: | |
pre-commit: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3 | |
- uses: pre-commit/action@9b88afc9cd57fd75b655d5c71bd38146d07135fe # v2.0.3 | |
Python: | |
name: core / Python ${{ matrix.ver }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-20.04, macos-latest] | |
ver: ['3.5', '3.6', '3.7', '3.8', '3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Set up Python | |
uses: actions/setup-python@75f3110429a8c05be0e1bf360334e4cced2b63fa # v2.3.3 | |
with: | |
python-version: ${{ matrix.ver }} | |
- name: Install Python ${{ matrix.ver }} dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools | |
python3 -m pip install tox numpy mypy pytest-mypy-plugins | |
- name: Execute Python tests | |
run: tox | |
- name: Install metaflow | |
run: pip install . | |
- name: Generate Stubs | |
run: cd ./stubs && rm -rf metaflow-stubs/ && python -c "from metaflow.cmd.develop.stub_generator import StubGenerator; StubGenerator('./metaflow-stubs').write_out()" && cd - | |
- name: Install metaflow-stubs | |
run: cd ./stubs && pip install . && cd - | |
- name: Run mypy tests | |
run: cd ./stubs && pytest --mypy-ini-file test/setup.cfg --mypy-only-local-stub && cd - | |
R: | |
name: core / R ${{ matrix.ver }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest] | |
ver: ['4.0'] | |
steps: | |
- uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2.7.0 | |
- name: Set up ${{ matrix.ver }} | |
uses: r-lib/actions/setup-r@33f03a860e4659235eb60a4d87ebc0b2ea65f722 # v2.4.0 | |
with: | |
r-version: ${{ matrix.ver }} | |
- name: Install R ${{ matrix.ver }} system dependencies | |
if: matrix.os == 'ubuntu-20.04' | |
run: sudo apt-get update; sudo apt-get install -y libcurl4-openssl-dev qpdf libgit2-dev libharfbuzz-dev libfribidi-dev | |
- name: Install R ${{ matrix.ver }} Rlang dependencies | |
run: | | |
python3 -m pip install . | |
Rscript -e 'install.packages("devtools", repos="https://cloud.r-project.org", Ncpus=8)' | |
Rscript -e 'devtools::install_deps("R", dependencies=TRUE, repos="https://cloud.r-project.org", upgrade="default")' | |
R CMD INSTALL R | |
Rscript -e 'install.packages(c("data.table", "caret", "glmnet", "Matrix", "rjson"), repos="https://cloud.r-project.org", Ncpus=8)' | |
- name: Execute R tests | |
run: | | |
cd R/tests | |
Rscript run_tests.R | |