mirror of
https://github.com/earthly/actions-setup.git
synced 2025-01-15 20:28:00 +08:00
95 lines
2.4 KiB
YAML
95 lines
2.4 KiB
YAML
name: "Test action-install-earthly"
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "releases/*"
|
|
|
|
jobs:
|
|
unit:
|
|
name: Unit Test
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- run: npm install
|
|
- run: npm run test
|
|
latest:
|
|
name: Test Latest Version Install
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- run: npm install
|
|
- run: npm run package
|
|
- uses: ./
|
|
- run: earthly --version
|
|
specific:
|
|
name: Test Specific Version Install
|
|
strategy:
|
|
matrix:
|
|
# windows was not available < v0.5.15
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- run: npm install
|
|
- run: npm run package
|
|
- uses: ./
|
|
with:
|
|
version: 0.5.15
|
|
- run: earthly --version
|
|
patch-range:
|
|
name: Test Patch Range Version Install
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- run: npm install
|
|
- run: npm run package
|
|
- uses: ./
|
|
with:
|
|
version: 0.6.*
|
|
- run: earthly --version
|
|
major-range:
|
|
name: Test Patch Range Version Install
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- run: npm install
|
|
- run: npm run package
|
|
- uses: ./
|
|
with:
|
|
version: ^0.6.1
|
|
- run: earthly --version
|