Skip to content

Commit 129a677

Browse files
authored
Merge pull request #14 from Hasenpfote/improve-gha-workflows
Improve gha workflows
2 parents 348e763 + 3461012 commit 129a677

20 files changed

+220
-85
lines changed

.github/settings/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
default:
2+
env:
3+
python-version: 3.8
4+
poetry-version: 1.3.1
5+
poetry-home: ''
6+
poetry-path: ''
7+
poetry-cache-paths: |-
8+
~/.local/share/pypoetry
9+
~/.local/bin/poetry
10+
poetry-cache-key-fmt: 'poetry-{0}-{1}-python-{2}'
11+
venv-cache-key-fmt: 'venv-{0}-python-{1}-{2}'

.github/settings/env.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33

44
shared: &shared
55
- '.github/actions/read-yaml/action.yml'
6-
- '.github/settings/lint_filters.yml'
6+
- '.github/settings/lint-filters.yml'
77
- '.github/workflows/lint.yml'
88

99
# python scripts
1010
py-shared: &py-shared
1111
- '.github/actions/setup-poetry/action.yml'
1212
- '.github/actions/setup-poetry-dependencies/action.yml'
13-
- '.github/settings/env.yml'
14-
- '.github/workflows/py_lint.yml'
13+
- '.github/settings/config.yml'
14+
- '.github/workflows/py-lint.yml'
1515
- 'poetry.lock'
1616
- 'pyproject.toml'
1717

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
default:
2+
enable-docs: true

.github/settings/test-config.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
default:
2+
matrix:
3+
os: [ubuntu-20.04, macos-latest, windows-latest]
4+
python-version: [3.7, 3.8]
5+
include:
6+
- os: ubuntu-20.04
7+
poetry-version: 1.3.1
8+
poetry-home: ''
9+
poetry-path: ''
10+
poetry-cache-paths: |-
11+
~/.local/share/pypoetry
12+
~/.local/bin/poetry
13+
14+
- os: macos-latest
15+
poetry-version: 1.3.1
16+
poetry-home: ''
17+
poetry-path: ${HOME}/.local/bin
18+
poetry-cache-paths: |-
19+
~/Library/Application Support/pypoetry
20+
~/.local/bin/poetry
21+
22+
- os: windows-latest
23+
poetry-version: 1.3.1
24+
poetry-home: ''
25+
poetry-path: ${APPDATA}\pypoetry\venv\Scripts
26+
poetry-cache-paths: |-
27+
~\AppData\Roaming\pypoetry
28+
~\AppData\Roaming\Python\Scripts\poetry.exe
29+
30+
poetry-cache-key-fmt: ['poetry-{0}-{1}-python-{2}']
31+
venv-cache-key-fmt: ['venv-{0}-python-{1}-{2}']
32+
enable-coverage: ['true']
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33

44
shared: &shared
55
- '.github/actions/read-yaml/action.yml'
6-
- '.github/settings/test_filters.yml'
6+
- '.github/settings/test-filters.yml'
77
- '.github/workflows/test.yml'
88

99
# python scripts
1010
py-shared: &py-shared
1111
- '.github/actions/setup-poetry/action.yml'
1212
- '.github/actions/setup-poetry-dependencies/action.yml'
13-
- '.github/settings/test_matrix.yml'
14-
- '.github/workflows/codecov_upload.yml'
15-
- '.github/workflows/py_test.yml'
13+
- '.github/settings/test-config.yml'
14+
- '.github/workflows/codecov-upload.yml'
15+
- '.github/workflows/py-test.yml'
1616
- 'poetry.lock'
1717
- 'pyproject.toml'
1818

.github/settings/test_matrix.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
type: string
1111

1212
jobs:
13-
env_prep:
13+
config-prep:
1414
runs-on: ubuntu-latest
1515
outputs:
1616
env: ${{ steps.read-file.outputs.content }}
@@ -22,12 +22,12 @@ jobs:
2222
id: read-file
2323
uses: ./.github/actions/read-yaml
2424
with:
25-
path: .github/settings/env.yml
26-
filter: '.env'
25+
path: .github/settings/config.yml
26+
filter: '.default.env'
2727

2828
build:
29-
needs: env_prep
30-
env: ${{ fromJson(needs.env_prep.outputs.env) }}
29+
needs: config-prep
30+
env: ${{ fromJson(needs.config-prep.outputs.env) }}
3131

3232
runs-on: ubuntu-latest
3333
steps:

0 commit comments

Comments
 (0)