Skip to content

Commit

Permalink
Optimize CI/CD stages (#1121)
Browse files Browse the repository at this point in the history
* Optimize CI/CD stages

* PR suggestion
  • Loading branch information
KJhellico authored Apr 26, 2023
1 parent 6bd9c47 commit 5ebd8a8
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 17 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@ jobs:
uses: actions/[email protected]
with:
cache: pip
cache-dependency-path: requirements/dev.txt
cache-dependency-path: |
requirements/runtime.txt
requirements/tests.txt
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade 'coveralls>=3' pip
python -m pip install --upgrade --requirement requirements/dev.txt
python -m pip install --upgrade --requirement requirements/tests.txt
python -m pip install --editable .
- name: Run Tests
run: |
Expand All @@ -59,6 +61,8 @@ jobs:
- name: Set Up Python
uses: actions/[email protected]
with:
cache: pip
cache-dependency-path: requirements/runtime.txt
python-version: '3.11'
- name: Install Dependencies
run: |
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ setup:
pip install --upgrade pip
pip install --requirement requirements/dev.txt
pip install --requirement requirements/docs.txt
pip install --requirement requirements/runtime.txt
pip install --requirement requirements/tests.txt
pre-commit install --hook-type pre-commit
pre-commit install --hook-type pre-push
make l10n
Expand Down
14 changes: 1 addition & 13 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# Package runtime requirements.
convertdate>=2.3.0
hijri-converter
korean-lunar-calendar
python-dateutil

# Test requirements.
coverage[toml]<7.0.0
flake8
# Test environments.
pre-commit
pytest
pytest-cov
pytest-xdist
sphinx
tox

# Localization.
Expand Down
5 changes: 5 additions & 0 deletions requirements/runtime.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Package runtime requirements.
convertdate>=2.3.0
hijri-converter
korean-lunar-calendar
python-dateutil
6 changes: 6 additions & 0 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Test requirements.
coverage[toml]<7.0.0
pytest
pytest-cov
pytest-xdist
polib
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ skip_missing_interpreters = true

[testenv]
deps =
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/requirements/runtime.txt
-r{toxinidir}/requirements/tests.txt
commands =
pytest

[testenv:docs]
base_python = python3.11
deps =
-r{toxinidir}/requirements/dev.txt
-r{toxinidir}/requirements/docs.txt
-r{toxinidir}/requirements/tests.txt
commands =
make doc
allowlist_externals =
Expand Down

0 comments on commit 5ebd8a8

Please sign in to comment.