-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Use composite action to install poetry (#34)
* feat!: Use composite action to install poetry The pattern of usage for GitHub Actions has moved towards setting up everything you need by installing it on the runner. This ends up being significantly faster to run and easier to reason about for a lot of pepole since they don't have to think about all of these independent workspaces/volumes. Since there's already a `setup-python` action offered directly by GitHub, and with the release of composite actions, seems like we could vastly simplify how this action works since all it actually needs to do is install poetry. We can assume that you've setup Python on your own in some other way. * Add lint pr workflow BREAKING CHANGE: This changes the input and usage of the action
- Loading branch information
Showing
9 changed files
with
81 additions
and
141 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,37 @@ | ||
name: CI | ||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python_version: [3.5, 3.6, 3.7, 3.8] | ||
poetry_version: [1.0] | ||
runs-on: ubuntu-latest | ||
python-version: [3.6, 3.7, 3.8] | ||
poetry-version: [1.0, 1.0.10] | ||
os: [ubuntu-18.04, macos-latest, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Run image | ||
uses: ./ | ||
with: | ||
python_version: ${{ matrix.python_version }} | ||
poetry_version: ${{ matrix.poetry_version }} | ||
working_directory: '.' | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Run image | ||
uses: ./ | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
- name: View poetry --help | ||
run: poetry --help | ||
release: | ||
if: github.event_name == 'push' | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Generate release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release | ||
- uses: actions/checkout@master | ||
- name: Generate release | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: npx semantic-release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: "Lint PR" | ||
on: | ||
pull_request: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: amannn/action-semantic-pull-request@v1.2.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
name: 'Python Poetry Action' | ||
author: '@abatilo' | ||
description: 'An action to run https://github.com/python-poetry/poetry' | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
name: "Python Poetry Action" | ||
author: "@abatilo" | ||
description: "An action to run https://github.com/python-poetry/poetry" | ||
branding: | ||
icon: 'truck' | ||
color: 'gray-dark' | ||
icon: "truck" | ||
color: "gray-dark" | ||
inputs: | ||
python_version: | ||
description: 'The version of python to install' | ||
required: true | ||
default: '3.8' | ||
poetry_version: | ||
description: 'The version of poetry to install' | ||
poetry-version: | ||
description: "The version of poetry to install" | ||
required: true | ||
default: '1.0' | ||
working_directory: | ||
description: 'The directory to run poetry commands in.' | ||
required: false | ||
default: '.' | ||
default: "1.0" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- run: | | ||
pip install poetry==${{ inputs.poetry-version }} | ||
shell: bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.