Skip to content

Commit

Permalink
Disable plugin tests during lute ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
jzohrab committed Jan 11, 2025
1 parent f02b18e commit 33cd999
Showing 1 changed file with 69 additions and 63 deletions.
132 changes: 69 additions & 63 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,70 +176,76 @@ jobs:
run: inv accept -s -k disabled_data_is_hidden


# Run all plugin tests.
# TODO - reenable plugin tests.
# Mandarin plugin tests started failing in ci,
# but the plugin still worked locally,
# and the tests also passed locally.
#
# For each plugin:
# - install Lute requirements
# - install plugin reqs
# - run tests.
#
# The Lute requirements are installed first b/c the plugins may come
# with their own conflicting requirements. Doing a full req install
# will (hopefully) uncover conflicts.
plugins:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
python_version: [ '3.8', '3.9', '3.10', '3.11' ]

steps:

- uses: actions/checkout@v4
with:
submodules: true

- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python_version }}
cache: 'pip' # caching pip dependencies

# Plugins likely won't need this config file, but just in case ...
- name: Setup config
run: |
mkdir ${{ github.workspace }}/data
echo "ENV: dev" > ${{ github.workspace }}/lute/config/config.yml
echo "DATAPATH: ${{ github.workspace }}/data" >> ${{ github.workspace }}/lute/config/config.yml
echo "DBNAME: test_lute.db" >> ${{ github.workspace }}/lute/config/config.yml
ls ${{ github.workspace }}
cat ${{ github.workspace }}/lute/config/config.yml
- name: test all plugins
run: |
# Lute reqs, such as pytest.
# This also installs Lute itself,
# so that it can be found
# by each plugin's own "pip install ."
pip install flit
flit install --deps develop
for plugin in $(ls plugins); do
pushd plugins/$plugin
pip install .
# Note for future: some plugins may have extra reqs not covered by pip
# (e.g. mecab uses apt-get and exports etc). Idea for future: plugin
# could have a .github folder as well with additional setup scripts.
pytest tests
# pip uninstall $plugin -y
# NOTE: Not bothering to do an uninstall!
# if multiple plugins have different/clashing version requirements,
# perhaps it is best to run into problems in ci.
# This may ultimately come back to haunt me, but it will do for now.
popd
done
# Disabling for now ... should re-enable.
### # Run all plugin tests.
### #
### # For each plugin:
### # - install Lute requirements
### # - install plugin reqs
### # - run tests.
### #
### # The Lute requirements are installed first b/c the plugins may come
### # with their own conflicting requirements. Doing a full req install
### # will (hopefully) uncover conflicts.
### plugins:
### runs-on: ubuntu-latest
### timeout-minutes: 30

### strategy:
### matrix:
### python_version: [ '3.10', '3.11' ]

### steps:

### - uses: actions/checkout@v4
### with:
### submodules: true

### - uses: actions/setup-python@v4
### with:
### python-version: ${{ matrix.python_version }}
### cache: 'pip' # caching pip dependencies

### # Plugins likely won't need this config file, but just in case ...
### - name: Setup config
### run: |
### mkdir ${{ github.workspace }}/data
### echo "ENV: dev" > ${{ github.workspace }}/lute/config/config.yml
### echo "DATAPATH: ${{ github.workspace }}/data" >> ${{ github.workspace }}/lute/config/config.yml
### echo "DBNAME: test_lute.db" >> ${{ github.workspace }}/lute/config/config.yml
### ls ${{ github.workspace }}
### cat ${{ github.workspace }}/lute/config/config.yml

### - name: test all plugins
### run: |
### # Lute reqs, such as pytest.
### # This also installs Lute itself,
### # so that it can be found
### # by each plugin's own "pip install ."
### pip install flit
### flit install --deps develop

### for plugin in $(ls plugins); do
### pushd plugins/$plugin
### flit install
### # Note for future: some plugins may have extra reqs not covered by pip
### # (e.g. mecab uses apt-get and exports etc). Idea for future: plugin
### # could have a .github folder as well with additional setup scripts.

### pytest tests

### # pip uninstall $plugin -y
### # NOTE: Not bothering to do an uninstall!
### # if multiple plugins have different/clashing version requirements,
### # perhaps it is best to run into problems in ci.
### # This may ultimately come back to haunt me, but it will do for now.
### popd
### done


code-quality:
Expand Down

0 comments on commit 33cd999

Please sign in to comment.