mirror of
https://github.com/android-actions/setup-android
synced 2024-11-22 13:29:35 -08:00
110 lines
2.2 KiB
YAML
110 lines
2.2 KiB
YAML
name: Build & Test
|
|
|
|
on:
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
push:
|
|
branches:
|
|
- main
|
|
- releases/*
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run build
|
|
|
|
- name: Check if dist/index.js needs to be rebuilt
|
|
run: diff <(git status dist/index.js --short) <(echo -n "")
|
|
|
|
format-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run format-check
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm test
|
|
|
|
runSdkManager:
|
|
runs-on: ${{ matrix.os }}
|
|
name: ${{ matrix.os }} - ${{ matrix.cmdline-tools-version }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, macos-13, windows-2019, windows-2022 ]
|
|
cmdline-tools-version:
|
|
- 10406996
|
|
- 9862592
|
|
- 9477386
|
|
- 9123335
|
|
- 8512546
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- name: Set up JDK 17
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
java-version: 17
|
|
distribution: 'temurin'
|
|
|
|
- run: npm ci
|
|
- run: npm run build
|
|
|
|
- run: node dist/index.js
|
|
env:
|
|
INPUT_CMDLINE-TOOLS-VERSION: ${{ matrix.cmdline-tools-version }}
|
|
INPUT_ACCEPT-ANDROID-SDK-LICENSES: 'true'
|
|
INPUT_LOG-ACCEPTED-ANDROID-SDK-LICENSES: 'false'
|
|
|
|
- run: sdkmanager --list
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node 20
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
- run: npm ci
|
|
|
|
- run: npm run lint
|