Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
a0cc7d6b
Commit
a0cc7d6b
authored
Nov 14, 2021
by
Bjorn Neergaard
Committed by
Arun Babu Neelicattu
Nov 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: DRY actions workflows
parent
9fc9a774
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
97 deletions
+13
-97
.github/workflows/installer.yml
+0
-74
.github/workflows/main.yml
+3
-9
.github/workflows/release.yml
+2
-6
.github/workflows/skip.yml
+8
-8
No files found.
.github/workflows/installer.yml
deleted
100644 → 0
View file @
9fc9a774
name
:
Test Installation Script
on
:
push
:
paths
:
-
'
install-poetry.py'
-
'
.github/workflows/installer.yml'
branches
:
-
master
pull_request
:
paths
:
-
'
install-poetry.py'
-
'
.github/workflows/installer.yml'
branches
:
-
'
**'
jobs
:
default
:
name
:
${{ matrix.os }} / ${{ matrix.python-version }} / install-poetry.py ${{ matrix.args }}
runs-on
:
${{ matrix.os }}-latest
strategy
:
matrix
:
os
:
[
Ubuntu
,
MacOS
,
Windows
]
python-version
:
[
"
3.6"
,
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
]
args
:
-
"
"
-
"
--preview"
-
"
--git
https://github.com/python-poetry/poetry.git"
-
"
--version
1.1.11"
steps
:
-
uses
:
actions/checkout@v2
-
name
:
Set up Python ${{ matrix.python-version }}
uses
:
actions/setup-python@v2
with
:
python-version
:
${{ matrix.python-version }}
-
name
:
Update PATH
if
:
${{ matrix.os != 'Windows' }}
shell
:
bash
run
:
echo "$HOME/.local/bin" >> $GITHUB_PATH
-
name
:
Update PATH for Windows
if
:
${{ matrix.os == 'Windows' }}
shell
:
bash
run
:
echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
-
name
:
Install Poetry
shell
:
bash
run
:
python install-poetry.py -y
-
name
:
Upload Failure Log
uses
:
actions/upload-artifact@v2
if
:
failure()
with
:
name
:
poetry-installer-error.log
path
:
poetry-installer-error-*.log
-
name
:
Verify Installation
shell
:
bash
run
:
|
set -e
poetry new foobar
cd foobar
poetry config virtualenvs.in-project true
poetry env use python
[ "$(poetry run python --version)" == "$(python --version)" ] \
|| { echo >&2 "ERROR: Virtual environment Python version do not match system version." && exit 1; }
-
name
:
Uninstall Poetry
shell
:
bash
run
:
|
python install-poetry.py -y --uninstall
{ type poetry 2>/dev/null >&2 && exit 1; } || exit 0
.github/workflows/main.yml
View file @
a0cc7d6b
...
...
@@ -19,12 +19,14 @@ jobs:
tests
:
name
:
${{ matrix.os }} / ${{ matrix.python-version }} ${{ matrix.suffix }}
runs-on
:
${{ matrix.os }}-latest
continue-on-error
:
${{ matrix.experimental }}
strategy
:
matrix
:
os
:
[
Ubuntu
,
MacOS
,
Windows
]
python-version
:
[
"
3.6"
,
"
3.7"
,
"
3.8"
,
"
3.9"
,
"
3.10"
]
fail-fast
:
false
defaults
:
run
:
shell
:
bash
steps
:
-
uses
:
actions/checkout@v2
...
...
@@ -35,26 +37,21 @@ jobs:
-
name
:
Get full Python version
id
:
full-python-version
shell
:
bash
run
:
echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
-
name
:
Bootstrap poetry
shell
:
bash
run
:
|
curl -sL https://install.python-poetry.org | python - -y ${{ matrix.bootstrap-args }}
-
name
:
Update PATH
if
:
${{ matrix.os != 'Windows' }}
shell
:
bash
run
:
echo "$HOME/.local/bin" >> $GITHUB_PATH
-
name
:
Update Path for Windows
if
:
${{ matrix.os == 'Windows' }}
shell
:
bash
run
:
echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH
-
name
:
Configure poetry
shell
:
bash
run
:
poetry config virtualenvs.in-project
true
-
name
:
Set up cache
...
...
@@ -66,13 +63,10 @@ jobs:
-
name
:
Ensure cache is healthy
if
:
steps.cache.outputs.cache-hit == 'true'
shell
:
bash
run
:
timeout 10s poetry run pip --version || rm -rf .venv
-
name
:
Install dependencies
shell
:
bash
run
:
poetry install
-
name
:
Run pytest
shell
:
bash
run
:
poetry run python -m pytest -p no:sugar -q tests/
.github/workflows/release.yml
View file @
a0cc7d6b
...
...
@@ -6,17 +6,13 @@ on:
-
'
*.*.*'
jobs
:
Release
:
release
:
name
:
Release
runs-on
:
ubuntu-latest
steps
:
-
name
:
Checkout code
uses
:
actions/checkout@v2
-
name
:
Get tag
id
:
tag
run
:
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
-
name
:
Set up Python 3.9
uses
:
actions/setup-python@v2
with
:
...
...
.github/workflows/skip.yml
View file @
a0cc7d6b
...
...
@@ -3,18 +3,18 @@ name: Skip All Jobs
on
:
push
:
paths
:
-
'
!
**'
-
'
docs/**'
-
'
.cirrus.yml'
paths
-ignore
:
-
'
**'
-
'
!
docs/**'
-
'
!
.cirrus.yml'
branches
:
-
master
-
develop
pull_request
:
paths
:
-
'
!
**'
-
'
docs/**'
-
'
.cirrus.yml'
paths
-ignore
:
-
'
**'
-
'
!
docs/**'
-
'
!
.cirrus.yml'
branches
:
-
'
**'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment