Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,27 +51,33 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry via actions
- name: Check out repository
uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install SpectraFit dependencies - 1 / 2
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install SpectraFit dependencies - 2 / 2
- name: Install library
run: poetry install --no-interaction
- name: Test SpectraFit
run: poetry run pytest --diff-symbols --cov=./spectrafit -vv --cov-report=xml --plots
run: |
source .venv/bin/activate
pytest --diff-symbols --cov=./spectrafit -vv --cov-report=xml --plots
- name: Codecov
uses: codecov/codecov-action@v3
with:
Expand All @@ -86,24 +92,21 @@ jobs:
- uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install Poetry via actions
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install SpectraFit dependencies - 1 / 2
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install SpectraFit dependencies - 2 / 2
- name: Install library
run: poetry install --no-interaction
- name: Set git config
run: |
Expand All @@ -112,7 +115,8 @@ jobs:
- name: Deploy documentation develops
if: contains(github.ref, 'refs/heads/main')
run: |
poetry run mkdocs gh-deploy --clean --force
source .venv/bin/activate
mkdocs gh-deploy --clean --force
docker:
name: Docker Image
needs: build
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,21 @@ jobs:
uses: actions/setup-python@v3
with:
python-version: 3.8
- name: Install Poetry via actions
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
installer-parallel: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v2
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install SpectraFit dependencies - 1 / 2
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install SpectraFit dependencies - 2 / 2
- name: Install library
run: poetry install --no-interaction
- name: Build and publish
run: |
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
rev: v1.12.1
hooks:
- id: blacken-docs
additional_dependencies: [black==21.12b0]
additional_dependencies: [black==22.3.0]
- repo: https://github.com/PyCQA/isort.git
rev: 5.10.1
hooks:
Expand All @@ -39,7 +39,7 @@ repos:
hooks:
- id: mypy
additional_dependencies:
[types-toml==0.10.4, types-PyYAML==6.0.1, types-tabulate==0.8.4]
[types-toml==0.10.6, types-PyYAML==6.0.7, types-tabulate==0.8.8]
- repo: https://github.com/pycqa/pydocstyle
rev: 6.1.1 # pick a git hash / tag to point to
hooks:
Expand Down