Configure DOCKER_HOST env var too #149
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright 2018 The original authors. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
name: Integration Tests | |
# We need to set these defaults so that .bashrc is called for each step. | |
# This is needed so that sdkman can be properly intialized | |
defaults: | |
run: | |
shell: bash -ieo pipefail {0} | |
env: | |
MAVEN_ARGS: -B -e | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
integration-tests: | |
name: Package Samples with Java ${{ matrix.java }} and JBang ${{ matrix.jbang }} | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: [8, 11, 17] | |
jbang: [0.84.2] | |
steps: | |
- name: Freee Disk Space | |
uses: jlumbroso/free-disk-space@main | |
with: | |
tool-cache: false | |
android: true | |
dotnet: true | |
haskell: true | |
large-packages: true | |
docker-images: true | |
swap-storage: false | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Cache .m2 registry | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}-${{ github.sha }} | |
restore-keys: ${{ runner.os }}-maven- | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: 'adopt' | |
- name: Setup sdkman | |
run: | | |
curl -s "https://get.sdkman.io" | bash | |
source "$HOME/.sdkman/bin/sdkman-init.sh" | |
sdkman_auto_answer=false | |
sdkman_selfupdate_enable=false | |
- name: Setup jbang | |
run: | | |
sdk install jbang ${{matrix.jbang}} | |
sdk default jbang ${{matrix.jbang}} | |
- name: Integration Tests | |
run: | | |
if [ ${{ github.event_name }} = 'pull_request' ]; then | |
REPO="${{ github.event.pull_request.head.repo.full_name }}" | |
REPO_NAME=`echo $REPO | cut -d'/' -f2` | |
REPO_OWNER=`echo $REPO | cut -d'/' -f1` | |
SHA="${{ github.event.pull_request.head.sha }}" | |
else | |
REPO="$GITHUB_REPOSITORY" | |
REPO_NAME=`echo $REPO | cut -d'/' -f2` | |
REPO_OWNER=`echo $REPO | cut -d'/' -f1` | |
SHA=$GITHUB_SHA | |
fi | |
export CURRENT_WORKFLOW_DEP=com.github.$REPO_OWNER.$REPO_NAME:buildpack-client:$SHA | |
echo Tests using dependency $CURRENT_WORKFLOW_DEP | |
cd samples/hello-spring | |
./pack.java | |
cd ../../samples/hello-quarkus | |
./pack.java | |