Skip to content

ci(wf): install asdf from binary #85

ci(wf): install asdf from binary

ci(wf): install asdf from binary #85

Workflow file for this run

---
name: Code checks
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-checks
cancel-in-progress: true
jobs:
plugin_test:
strategy:
matrix:
os:
- macos-latest
- ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Tools with asdf
env:
ASDF_VERSION: v0.16.5
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl -Ls --proto "=https" https://github.com/asdf-vm/asdf/releases/download/${ASDF_VERSION}/asdf-${ASDF_VERSION}-linux-amd64.tar.gz --output asdf.tar.gz
tar xf asdf.tar.gz
mkdir -p "${GITHUB_WORKSPACE}/.local/bin"
mv asdf "${GITHUB_WORKSPACE}/.local/bin"
chmod +x "${GITHUB_WORKSPACE}/.local/bin/asdf"
rm asdf.tar.gz
echo "${GITHUB_WORKSPACE}/.local/bin" >> "$GITHUB_PATH"
- name: Install bats
run: |
asdf plugin add bats
asdf install bats
- name: Test plugin with bats
run: |
echo "::group::Install local plugin"
asdf plugin add k9s "${GITHUB_WORKSPACE}"
echo "::endgroup::"
echo "::group::Test plugin with bats"
bats --filter-tags type:features --filter-tags type:os_specific test
echo "::endgroup::"
lint_and_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Tools with asdf
uses: asdf-vm/actions/install@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit checks
shell: bash
run: |
pre-commit run --all-files
- name: Test code with bats
run: |
bats --filter-tags type:code test