From 6f6a9846be8e60bc7384906092e1c7e063aae19d Mon Sep 17 00:00:00 2001 From: Alessandro Amici Date: Wed, 9 Mar 2022 09:23:04 +0100 Subject: [PATCH] yaml code style --- .github/workflows/on-push.yml | 132 +++++++++++++++++----------------- 1 file changed, 65 insertions(+), 67 deletions(-) diff --git a/.github/workflows/on-push.yml b/.github/workflows/on-push.yml index 9fe2c3a..95369f3 100644 --- a/.github/workflows/on-push.yml +++ b/.github/workflows/on-push.yml @@ -5,7 +5,7 @@ on: branches: - main tags: - - '*' + - "*" pull_request: branches: - main @@ -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 @@ -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 }} \ No newline at end of file + - 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 }}