mirror of
https://github.com/jdx/mise-action.git
synced 2026-05-15 14:20:32 +00:00
* Change test tool for future alpine CI testing * replace node with jq as it doesnt require any build on alpine * Fix alpine musl container install * add tests around mise install in alpine container * add support for musl os Fixes: https://github.com/jdx/mise-action/issues/186 * alpine needs bash to run test.sh script * remove unneeded logs * Update test.yml * Update test.yml
76 lines
1.9 KiB
YAML
76 lines
1.9 KiB
YAML
name: 'build-test'
|
|
on: # rebuild any PRs and main branch changes
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- main
|
|
- 'releases/*'
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref_name }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build: # make sure build/ci work properly
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: |
|
|
npm install
|
|
- run: |
|
|
npm run all
|
|
test: # make sure the action works on a clean machine without building
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- name: ubuntu
|
|
runs-on: ubuntu-latest
|
|
- name: macos
|
|
runs-on: macos-latest
|
|
- name: windows
|
|
runs-on: windows-latest
|
|
- name: alpine
|
|
runs-on: ubuntu-latest
|
|
container: alpine:latest
|
|
requirements: apk add --no-cache curl bash
|
|
name: ${{ matrix.name }}
|
|
runs-on: ${{ matrix.runs-on }}
|
|
container: ${{ matrix.container }}
|
|
steps:
|
|
- name: Install requirements
|
|
if: ${{ matrix.requirements }}
|
|
run: ${{ matrix.requirements }}
|
|
- uses: actions/checkout@v4
|
|
- name: Setup mise
|
|
uses: ./
|
|
with:
|
|
mise_toml: |
|
|
[tools]
|
|
jq = "1.7.1"
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
- run: mise --version
|
|
- run: mise x jq -- jq --version
|
|
- run: which jq
|
|
- run: jq --version
|
|
- run: . scripts/test.sh
|
|
shell: bash
|
|
|
|
specific_version:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Setup mise
|
|
uses: ./
|
|
with:
|
|
cache_save: ${{ github.ref_name == 'main' }}
|
|
cache_key_prefix: mise-v1
|
|
version: 2024.9.6
|
|
install_args: bun
|
|
mise_toml: |
|
|
[tools]
|
|
bun = "1"
|
|
- run: which bun
|
|
- run: bun -v
|