Merge pull request #946 from bact/arrange-workflow-files #2
This file contains hidden or 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: Unit test and code coverage (Windows) | |
on: | |
push: | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- 'docs/**' | |
pull_request: | |
branches: | |
- dev | |
paths-ignore: | |
- '**.md' | |
- '**.yml' | |
- 'docs/**' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest] | |
python-version: [3.8] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
auto-activate-base: true | |
auto-update-conda: true | |
- name: Show environment | |
shell: powershell | |
run: | | |
conda info | |
conda list | |
- name: Install PyTorch | |
shell: powershell | |
run: | | |
pip install torch==1.8.1 | |
- name: Install dependencies | |
shell: powershell | |
env: | |
SKLEARN_ALLOW_DEPRECATED_SKLEARN_PACKAGE_INSTALL: True | |
run: | | |
python -m pip install --disable-pip-version-check --user --upgrade pip setuptools | |
python -m pip install backports.zoneinfo[tzdata] | |
python -m pip --version | |
python -m pip install pytest coverage coveralls | |
conda install -y -c conda-forge fairseq | |
python -m pip install https://www.dropbox.com/s/o6p2sj5z50iim1e/PyICU-2.3.1-cp38-cp38-win_amd64.whl?dl=1 | |
python -m pip install -r docker_requirements.txt | |
python -m pip install .[full] | |
python -m nltk.downloader omw-1.4 | |
python -m pip install spacy deepcut tltk | |
- name: Test | |
shell: powershell | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_SERVICE_NAME: github | |
run: | | |
coverage run -m unittest discover | |
coveralls |