Skip to content

Commit

Permalink
Change to better github actions asdf setup
Browse files Browse the repository at this point in the history
  • Loading branch information
danielholmes committed Dec 22, 2023
1 parent 5acb516 commit 6e4cb29
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,26 @@ jobs:
- uses: actions/checkout@v3

- name: ASDF Setup
uses: asdf-vm/actions/setup@v1
uses: asdf-vm/actions/setup@v2

- name: ASDF Cache
id: asdf-cache
- name: Restore ASDF tools from cache
id: asdf-tools-cache
uses: actions/cache@v3
with:
path: ~/.asdf/
key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }}
key: asdf-tools-${{ hashFiles('**/.tool-versions') }}
restore-keys: |
asdf-tools-
path: |
${{ env.ASDF_DIR }}/plugins
${{ env.ASDF_DIR }}/installs
- name: Install CD tools from .tool-versions
if: steps.asdf-cache.outputs.cache-hit != 'true'
uses: asdf-vm/actions/install@v1
- name: Install ASDF tools on cache-miss
if: ${{ steps.asdf-tools-cache.outputs.cache-hit != 'true' }}
uses: asdf-vm/actions/install@v2

- name: Reshim installed ASDF tools
shell: bash
run: asdf reshim

- name: Install dependencies
uses: bahmutov/npm-install@v1
Expand Down

0 comments on commit 6e4cb29

Please sign in to comment.