diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 4e7a7103..62c526ca 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -41,38 +41,38 @@ jobs: - name: "Run tests on ${{ matrix.os }}" run: | - echo tox -e clean,$(echo py${{ matrix.python-version }} | tr -d .)${{env.LINT_DOCS}},report + tox -e clean,$(echo py${{ matrix.python-version }} | tr -d .)${{env.LINT_DOCS}},report # https://github.com/marketplace/actions/coveralls-python # The official coverallsapp/github-action@master doesn't work: https://github.com/marketplace/actions/coveralls-github-action # It fails with "Error: Lcov file not found." # Solution here: https://github.com/coverallsapp/github-action/issues/30#issuecomment-612523058 - # - name: Coveralls - # # TODO: ci: run code coverage on all platforms to fix missing coverage - # # Example: https://github.com/andreoliwa/nitpick/pull/479#issuecomment-1082074275 - # # This condition is needed otherwise it fails with "Error: Container action is only supported on Linux" - # if: matrix.os == 'ubuntu-latest' - # uses: AndreMiras/coveralls-python-action@develop - # with: - # parallel: true - # flag-name: Unit Test + - name: Coveralls + # TODO: ci: run code coverage on all platforms to fix missing coverage + # Example: https://github.com/andreoliwa/nitpick/pull/479#issuecomment-1082074275 + # This condition is needed otherwise it fails with "Error: Container action is only supported on Linux" + if: matrix.os == 'ubuntu-latest' + uses: AndreMiras/coveralls-python-action@develop + with: + parallel: true + flag-name: Unit Test # https://github.com/marketplace/actions/coveralls-python - # coveralls_finish: - # name: Coveralls (finish) - # needs: build - # runs-on: ubuntu-latest - # steps: - # - name: Coveralls Finished - # uses: AndreMiras/coveralls-python-action@develop - # with: - # parallel-finished: true + coveralls_finish: + name: Coveralls (finish) + needs: build + runs-on: ubuntu-latest + steps: + - name: Coveralls Finished + uses: AndreMiras/coveralls-python-action@develop + with: + parallel-finished: true # This cannot be a separate workflow yet, because a workflow cannot depend on another workflow. See this topic: # Depend on another workflow - Code to Cloud / GitHub Actions - GitHub Support Community # https://github.community/t/depend-on-another-workflow/16311 release: - # needs: coveralls_finish + needs: coveralls_finish # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsif # https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#determining-when-to-use-contexts # if: github.event_name == 'push' && github.ref == 'refs/heads/master' # FIXME[AA]: @@ -82,10 +82,6 @@ jobs: uses: actions/checkout@v3 with: persist-credentials: false - # - name: Setup npm - # uses: actions/setup-node@v3 - # with: - # node-version: 19 # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path - name: Add to PATH run: echo "$HOME/.local/bin" >> $GITHUB_PATH @@ -104,15 +100,17 @@ jobs: twine --version python3 -m pip freeze - name: Semantic Release + # https://github.com/marketplace/actions/action-for-semantic-release#semantic_version uses: cycjimmy/semantic-release-action@v3 id: semantic # Need an `id` for output variables with: - # https://github.com/marketplace/actions/action-for-semantic-release#semantic_version + # Don't pin version here... it didn't work # https://github.com/semantic-release/semantic-release/releases - # semantic_version: 20.0.0 + # semantic_version: 20.0.0 # To debug, see these options: # https://github.com/marketplace/actions/action-for-semantic-release#dry_run + dry_run: true # FIXME[AA]: # https://github.com/marketplace/actions/action-for-semantic-release#branches # https://github.com/marketplace/actions/action-for-semantic-release#extra_plugins @@ -120,9 +118,9 @@ jobs: # https://github.com/semantic-release/git/releases # https://github.com/semantic-release/exec/releases extra_plugins: | - @semantic-release/changelog@6.0.3 - @semantic-release/git@10.0.1 - @semantic-release/exec@6.0.3 + @semantic-release/changelog + @semantic-release/git + @semantic-release/exec env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} diff --git a/package.json b/package.json index 92c96f70..8ae6727e 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,6 @@ "url": "https://github.com/andreoliwa/nitpick.git" }, "release": { - "dryRun": true, "plugins": [ "@semantic-release/commit-analyzer", "@semantic-release/release-notes-generator", @@ -20,7 +19,7 @@ "@semantic-release/exec", { "prepareCmd": "bash ./ci-prepare-cmd.sh ${nextRelease.version}", - "publishCmd": "poetry build && poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD" + "publishCmd": "poetry build && echo poetry publish --username $PYPI_USERNAME --password $PYPI_PASSWORD" } ], "@semantic-release/github",