Skip to content

Commit

Permalink
yaml code style
Browse files Browse the repository at this point in the history
  • Loading branch information
alexamici committed Mar 9, 2022
1 parent b2daeaf commit 6f6a984
Showing 1 changed file with 65 additions and 67 deletions.
132 changes: 65 additions & 67 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches:
- main
tags:
- '*'
- "*"
pull_request:
branches:
- main
Expand All @@ -18,33 +18,32 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key:
ubuntu-latest-3.9
- uses: conda-incubator/setup-miniconda@v2
with:
channels: default, conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: ubuntu-latest-3.9
auto-update-conda: false
python-version: 3.9
use-only-tar-bz2: true
- name: Install dependencies
run: |
make conda-env-update CONDA=mamba ENVIRONMENT=ubuntu-latest-3.9
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run tests
run: |
make test COV_REPORT=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ubuntu-latest-3.9
- uses: conda-incubator/setup-miniconda@v2
with:
channels: default, conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: ubuntu-latest-3.9
auto-update-conda: false
python-version: 3.9
use-only-tar-bz2: true
- name: Install dependencies
run: |
make conda-env-update CONDA=mamba ENVIRONMENT=ubuntu-latest-3.9
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run tests
run: |
make test COV_REPORT=xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@v1

code-quality:
runs-on: ubuntu-latest
Expand All @@ -53,48 +52,47 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key:
ubuntu-latest-3.9
- uses: conda-incubator/setup-miniconda@v2
with:
channels: default, conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: ubuntu-latest-3.9
auto-update-conda: false
python-version: 3.9
use-only-tar-bz2: true
- name: Install dependencies
run: |
make conda-env-update CONDA=mamba ENVIRONMENT=ubuntu-latest-3.9
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run code quality checks
run: |
make code-quality
- name: Run code style checks
run: |
make code-style
- uses: actions/checkout@v2
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ubuntu-latest-3.9
- uses: conda-incubator/setup-miniconda@v2
with:
channels: default, conda-forge
channel-priority: strict
mamba-version: "*"
activate-environment: ubuntu-latest-3.9
auto-update-conda: false
python-version: 3.9
use-only-tar-bz2: true
- name: Install dependencies
run: |
make conda-env-update CONDA=mamba ENVIRONMENT=ubuntu-latest-3.9
- name: Install package
run: |
python -m pip install --no-deps -e .
- name: Run code quality checks
run: |
make code-quality
- name: Run code style checks
run: |
make code-style
distribution:
runs-on: ubuntu-latest
needs: [unit-tests, code-quality]

steps:
- uses: actions/checkout@v2
- name: Build distributions
run: |
$CONDA/bin/python -m pip install build
$CONDA/bin/python -m build
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- uses: actions/checkout@v2
- name: Build distributions
run: |
$CONDA/bin/python -m pip install build
$CONDA/bin/python -m build
- name: Publish a Python distribution to PyPI
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 6f6a984

Please sign in to comment.