Skip to content

Commit

Permalink
ci: don't pin, dry run again
Browse files Browse the repository at this point in the history
  • Loading branch information
andreoliwa committed Mar 27, 2023
1 parent e1785ef commit be4c631
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 31 deletions.
56 changes: 27 additions & 29 deletions .github/workflows/python.yaml
Expand Up @@ -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]:
Expand All @@ -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
Expand All @@ -104,25 +100,27 @@ 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
# https://github.com/semantic-release/changelog/releases
# 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 }}
Expand Down
3 changes: 1 addition & 2 deletions package.json
Expand Up @@ -6,7 +6,6 @@
"url": "https://github.com/andreoliwa/nitpick.git"
},
"release": {
"dryRun": true,
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
Expand All @@ -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",
Expand Down

0 comments on commit be4c631

Please sign in to comment.