2019-11-21 04:49:08 +08:00
|
|
|
name: asdf-java Tests
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os: ['ubuntu-latest', 'macOS-latest']
|
2019-11-21 05:12:32 +08:00
|
|
|
env:
|
|
|
|
TERM: dumb
|
2019-11-21 04:49:08 +08:00
|
|
|
steps:
|
2019-12-31 00:23:27 +08:00
|
|
|
- uses: actions/checkout@v2
|
2019-11-21 05:09:19 +08:00
|
|
|
- uses: mstksg/get-package@v1
|
|
|
|
with:
|
2020-04-16 12:38:11 +08:00
|
|
|
brew: bash coreutils jq shellcheck
|
2020-02-28 18:05:49 +08:00
|
|
|
apt-get: jq shellcheck
|
|
|
|
- name: Run ShellCheck
|
|
|
|
run: |
|
|
|
|
shellcheck -V
|
|
|
|
shellcheck ./bin/functions
|
2020-04-26 23:49:12 +08:00
|
|
|
shellcheck ./update_data.bash
|
2019-11-21 05:04:19 +08:00
|
|
|
- name: Install asdf
|
2019-12-31 00:23:27 +08:00
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: asdf-vm/asdf
|
|
|
|
path: asdf
|
2019-11-21 04:49:08 +08:00
|
|
|
- name: Run tests
|
2020-01-20 00:42:36 +08:00
|
|
|
env:
|
|
|
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2019-11-21 05:08:07 +08:00
|
|
|
run: |
|
|
|
|
. asdf/asdf.sh
|
2020-04-26 22:23:58 +08:00
|
|
|
asdf plugin-test java "$GITHUB_WORKSPACE" --asdf-plugin-gitref "$GITHUB_SHA" --asdf-tool-version adoptopenjdk-8.0.252+9.1.openj9-0.20.0 java -version
|
2021-04-06 23:54:36 +08:00
|
|
|
- name: macOS Check java_home integration
|
|
|
|
env:
|
|
|
|
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run: |
|
|
|
|
export ASDF_CONFIG_FILE=${HOME}"/.asdfrc"
|
|
|
|
echo "java_macos_integration_enable = yes" > "${ASDF_CONFIG_FILE}"
|
|
|
|
. asdf/asdf.sh
|
|
|
|
asdf plugin-test java "$GITHUB_WORKSPACE" --asdf-plugin-gitref "$GITHUB_SHA" --asdf-tool-version zulu-8.52.0.23 /usr/libexec/java_home -V 2>&1 | grep "Zulu 8.52.0.23"
|
|
|
|
if: matrix.os == 'macOS-latest'
|