Skip to content

Commit c26bbb4

Browse files
committed
ci: consolidate workflows
1 parent 0146829 commit c26bbb4

1 file changed

Lines changed: 18 additions & 34 deletions

File tree

.github/workflows/build.yml

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,25 @@ env:
1616
ASDF_CONCURRENCY: 2
1717

1818
jobs:
19-
build_from_installers:
20-
name: asdf-awscli plugin test using prebuilt installers
19+
build:
2120
strategy:
2221
matrix:
2322
os:
2423
- ubuntu-latest
2524
- macos-latest
26-
# - windows-latest In theory this should work, but ASDF requires bash and
25+
# - windows-latest In theory this should work, but ASDF requires bash and friends
2726
python-version:
2827
- "3.8"
2928
- "3.11"
3029
cli-version:
3130
- "latest:1"
3231
- "latest:2"
33-
coreutils:
34-
- default
35-
- latest
32+
- "source"
33+
include:
34+
- os: macos-latest
35+
coreutils:
36+
- default
37+
- latest
3638
runs-on: ${{ matrix.os }}
3739
steps:
3840
- name: Setup homebrew if using latest coreutils
@@ -61,44 +63,26 @@ jobs:
6163
"${pythonLocation}/bin/python" --version
6264
echo "${GITHUB_PATH}"
6365
echo "${PATH}"
64-
66+
6567
- name: asdf_plugin_test
6668
uses: asdf-vm/actions/plugin-test@v2
6769
with:
6870
command: aws --version
6971
version: ${{ matrix.cli-version }}
7072

71-
build_from_source:
72-
name: asdf-awscli plugin test using source
73-
strategy:
74-
matrix:
75-
os:
76-
- ubuntu-latest
77-
- macos-latest
78-
python-version:
79-
- "3.8"
80-
- "3.11"
81-
runs-on: ${{ matrix.os }}
82-
steps:
83-
- name: Set up Python
84-
uses: actions/setup-python@v4
85-
with:
86-
python-version: ${{ matrix.python-version }}
87-
88-
- name: Install asdf-awscli
89-
uses: asdf-vm/actions/plugins-add@v2
90-
with:
91-
tool_versions: |
92-
# tools won't be installed by this action, only plugins
93-
awscli
73+
- name: Retrieve latest version (source)
74+
if: matrix.cli-version == 'source'
75+
run: |
76+
echo "AWSCLI_VERSION=ref:$(asdf latest awscli 2)" >> "${GITHUB_ENV}"
9477
95-
- name: Retrieve latest version
78+
- name: Retrieve latest version (binary)
79+
if: matrix.cli-version != 'source'
9680
run: |
97-
echo "cli-version=ref:$(asdf latest awscli 2)" >> "${GITHUB_ENV}"
81+
echo "AWSCLI_VERSION=$(asdf latest awscli 2)" >> "${GITHUB_ENV}"
9882
9983
- name: asdf_plugin_test
10084
uses: asdf-vm/actions/plugin-test@v2
10185
with:
102-
skip_install: true
10386
command: aws --version
104-
version: ${{ env.cli-version }}
87+
88+
version: ${{ env.AWSCLI_VERSION || '' }}

0 commit comments

Comments
 (0)