Switching back to alpine #21
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
name: Uberjar | |
on: | |
push: | |
branches: | |
- '**' | |
paths-ignore: | |
- 'docs/**' | |
- 'frontend/test/**' | |
- 'enterprise/frontend/test/**' | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
edition: [ee, oss] | |
env: | |
MB_EDITION: ${{ matrix.edition }} | |
INTERACTIVE: false | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Prepare JDK 8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 8 | |
- name: Install Clojure CLI | |
run: | | |
curl -O https://download.clojure.org/install/linux-install-1.10.3.933.sh && | |
sudo bash ./linux-install-1.10.3.933.sh | |
- name: Check versions | |
run: | | |
echo "Node.js `node --version`" | |
echo "yarn `yarn --version`" | |
java -version | |
- name: Get yarn cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/yarn | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
- name: Get M2 cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.m2 | |
~/.gitlibs | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/deps.edn') }} | |
- run: yarn install --frozen-lockfile --prefer-offline | |
- run: MB_EDITION=${{ matrix.edition }} ./bin/build | |
- name: Mark with the commit hash | |
run: git rev-parse --short HEAD > COMMIT-ID | |
- name: Calculate SHA256 checksum | |
run: sha256sum ./target/uberjar/metabase.jar > SHA256.sum | |
- name: Upload JARs as artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: metabase-${{ matrix.edition }}-uberjar | |
path: | | |
./target/uberjar/metabase.jar | |
./COMMIT-ID | |
./SHA256.sum | |
check: | |
runs-on: ubuntu-20.04 | |
name: check ${{ matrix.edition }} (java ${{ matrix.java-version }}) | |
needs: build | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
edition: [ee, oss] | |
java-version: [8, 11, 17] | |
steps: | |
- name: Prepare JRE (Java Run-time Environment) | |
uses: actions/setup-java@v1 | |
with: | |
java-package: jre | |
java-version: ${{ matrix.java-version }} | |
- run: java -version | |
- uses: actions/download-artifact@v2 | |
name: Retrieve uberjar artifact | |
with: | |
name: metabase-${{ matrix.edition }}-uberjar | |
- name: Launch uberjar | |
run: java -jar ./target/uberjar/metabase.jar & | |
- name: Wait for Metabase to start | |
run: while ! curl -s localhost:3000/api/health; do sleep 1; done | |
timeout-minutes: 5 | |
- name: Check API health | |
run: curl -s localhost:3000/api/health |