Skip to content

test(smoketest): apply resource limits to Cryostat components #10

test(smoketest): apply resource limits to Cryostat components

test(smoketest): apply resource limits to Cryostat components #10

Workflow file for this run

name: CI build and push
concurrency:
group: ci-${{ github.run_id }}
cancel-in-progress: true
on:
push:
branches:
- main
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
pull_request_target:
types:
- opened
- reopened
- synchronize
- labeled
- unlabeled
branches:
- main
- v[0-9]+
- v[0-9]+.[0-9]+
- cryostat-v[0-9]+.[0-9]+
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
java: [ '17', '20' ]
env:
TESTCONTAINERS_RYUK_DISABLED: true
cache-name: cache-yarn
name: Build and test Java ${{ matrix.java }}
permissions:
packages: write
contents: read
if: ${{ github.repository_owner == 'cryostatio' }}
steps:
# - name: Fail if PR and safe-to-test label NOT applied
# if: ${{ github.event_name == 'pull_request_target' && !contains(github.event.pull_request.labels.*.name, 'safe-to-test') }}
# run: exit 1
- uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
submodules: true
fetch-depth: 0
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
cache: 'maven'
- name: maven-settings
uses: s4u/maven-settings-action@v2
with:
servers: '[{"id": "github", "username": "dummy", "password": "${{ secrets.GITHUB_TOKEN }}"}]'
githubServer: false
- run: git submodule init && git submodule update
- name: Cache yarn packages
uses: actions/cache@v3
with:
path: "./src/main/webui/.yarn/cache"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Initialize web assets
run: |
cd src/main/webui
yarn install && yarn yarn:frzinstall
cd -
- name: Update podman
run: |
sudo apt-get -y purge podman
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/Release.key | gpg --dearmor | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg] \
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_$(lsb_release -rs)/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
sudo apt-get update -qq
sudo apt-get -qq -y install podman
- name: Install podman-docker
run: |
sudo apt-get -y purge moby-cli
sudo apt install -y podman-docker
- name: Setup docker host
run: echo "DOCKER_HOST=unix:///run/user/$(id -u)/podman/podman.sock" >> "$GITHUB_ENV"
- name: Set up testcontainers for podman
run: |
echo ryuk.container.privileged=true > ~/.testcontainers.properties
- run: systemctl --user enable --now podman.socket
- name: Build db image
run: sh db/build.sh
- name: Run tests
run: ./mvnw -B -U clean verify