mirror of
https://github.com/earthly/actions-setup.git
synced 2025-01-15 12:08:00 +08:00
110 lines
2.9 KiB
YAML
110 lines
2.9 KiB
YAML
name: "Test action-install-earthly"
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- "main"
|
|
- "releases/*"
|
|
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
jobs:
|
|
unit:
|
|
name: earthly +all
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
cache: ${{ !env.ACT && 'npm' || '' }}
|
|
node-version: "16.x"
|
|
- uses: ./
|
|
- run: earthly +all
|
|
# Below are tests specific to the github actions, which ensure the actions-setup code works with GHA
|
|
latest:
|
|
name: Test Latest Version Install
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, macos-latest, windows-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v4
|
|
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@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v4
|
|
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@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v4
|
|
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@v4
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
- uses: actions/setup-node@v4
|
|
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
|