Skip to content

Commit

Permalink
Tests: Add CI - CircleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
BLKSerene committed Aug 14, 2023
1 parent ee5197b commit 95522da
Showing 1 changed file with 165 additions and 0 deletions.
165 changes: 165 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# ----------------------------------------------------------------------
# Wordless: CI - CircleCI
# Copyright (C) 2018-2023 Ye Lei (叶磊)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# ----------------------------------------------------------------------

version: 2.1

jobs:
# Windows
windows:
machine:
- image: 'windows-server-2019-vs2019:current'
- resource_class: windows.2xlarge
- shell: powershell.exe -ExecutionPolicy Bypass

steps:
- checkout

# Install dependencies
- run:
command: |
pip install --upgrade pip setuptools
pip install --requirement requirements/requirements_tests.txt
pip install --requirement requirements/requirements_no_deps.txt --no-deps
:: Download models and data files
python utils/wl_downloader_ci.py
name: Install dependencies

# Run tests
- run:
command: |
pytest tests/wl_tests_nlp/wl_tests_spacy/test_spacy_eng.py
pytest tests/wl_tests_nlp/test_sentence_tokenization.py
pytest tests/wl_tests_nlp/test_word_tokenization.py
pytest tests/wl_tests_nlp/test_syl_tokenization.py
pytest tests/wl_tests_nlp/test_pos_tagging.py
pytest tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_nlp/ --ignore=tests/wl_tests_nlp/wl_tests_spacy --ignore=tests/wl_tests_nlp/test_sentence_tokenization.py --ignore=tests/wl_tests_nlp/test_word_tokenization.py --ignore=tests/wl_tests_nlp/test_syl_tokenization.py --ignore=tests/wl_tests_nlp/test_pos_tagging.py --ignore=tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_file_area/test_file_area.py
pytest --ignore=tests/wl_tests_nlp --ignore=tests/wl_tests_file_area/test_file_area.py
name: Run tests

# macOS
macos:
macos:
- xcode: 14.1.0
- resource_class: macos.x86.medium.gen2

steps:
- checkout

# Install dependencies
- run:
command: |
pip3 install --upgrade pip setuptools
pip3 install --requirement requirements/requirements_tests.txt
pip3 install --requirement requirements/requirements_no_deps.txt --no-deps
:: Download models and data files
python3 utils/wl_downloader_ci.py
name: Install dependencies

# Run tests
- run:
command: |
pytest tests/wl_tests_nlp/wl_tests_spacy/test_spacy_eng.py
pytest tests/wl_tests_nlp/test_sentence_tokenization.py
pytest tests/wl_tests_nlp/test_word_tokenization.py
pytest tests/wl_tests_nlp/test_syl_tokenization.py
pytest tests/wl_tests_nlp/test_pos_tagging.py
pytest tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_nlp/ --ignore=tests/wl_tests_nlp/wl_tests_spacy --ignore=tests/wl_tests_nlp/test_sentence_tokenization.py --ignore=tests/wl_tests_nlp/test_word_tokenization.py --ignore=tests/wl_tests_nlp/test_syl_tokenization.py --ignore=tests/wl_tests_nlp/test_pos_tagging.py --ignore=tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_file_area/test_file_area.py
pytest --ignore=tests/wl_tests_nlp --ignore=tests/wl_tests_file_area/test_file_area.py
name: Run tests

# Linux
linux:
machine:
- image: ubuntu-2004:current
- resource_class: 2xlarge+

steps:
- checkout

# Install dependencies
- run:
command: |
pip install --upgrade pip setuptools
pip install --requirement requirements/requirements_tests.txt
pip install --requirement requirements/requirements_no_deps.txt --no-deps
:: Download models and data files
python utils/wl_downloader_ci.py
name: Install dependencies

# Run tests
- run:
command: |
pytest tests/wl_tests_nlp/wl_tests_spacy/test_spacy_eng.py
pytest tests/wl_tests_nlp/test_sentence_tokenization.py
pytest tests/wl_tests_nlp/test_word_tokenization.py
pytest tests/wl_tests_nlp/test_syl_tokenization.py
pytest tests/wl_tests_nlp/test_pos_tagging.py
pytest tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_nlp/ --ignore=tests/wl_tests_nlp/wl_tests_spacy --ignore=tests/wl_tests_nlp/test_sentence_tokenization.py --ignore=tests/wl_tests_nlp/test_word_tokenization.py --ignore=tests/wl_tests_nlp/test_syl_tokenization.py --ignore=tests/wl_tests_nlp/test_pos_tagging.py --ignore=tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_file_area/test_file_area.py
pytest --ignore=tests/wl_tests_nlp --ignore=tests/wl_tests_file_area/test_file_area.py
name: Run tests

# Docker
docker:
docker:
- image: cimg/python:3.10
- resource_class: xlarge

steps:
- checkout

# Install dependencies
- run:
command: |
pip install --upgrade pip setuptools
pip install --requirement requirements/requirements_tests.txt
pip install --requirement requirements/requirements_no_deps.txt --no-deps
:: Download models and data files
python utils/wl_downloader_ci.py
name: Install dependencies

# Run tests
- run:
command: |
pytest tests/wl_tests_nlp/wl_tests_spacy/test_spacy_eng.py
pytest tests/wl_tests_nlp/test_sentence_tokenization.py
pytest tests/wl_tests_nlp/test_word_tokenization.py
pytest tests/wl_tests_nlp/test_syl_tokenization.py
pytest tests/wl_tests_nlp/test_pos_tagging.py
pytest tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_nlp/ --ignore=tests/wl_tests_nlp/wl_tests_spacy --ignore=tests/wl_tests_nlp/test_sentence_tokenization.py --ignore=tests/wl_tests_nlp/test_word_tokenization.py --ignore=tests/wl_tests_nlp/test_syl_tokenization.py --ignore=tests/wl_tests_nlp/test_pos_tagging.py --ignore=tests/wl_tests_nlp/test_lemmatization.py
pytest tests/wl_tests_file_area/test_file_area.py
pytest --ignore=tests/wl_tests_nlp --ignore=tests/wl_tests_file_area/test_file_area.py
name: Run tests

0 comments on commit 95522da

Please sign in to comment.