CI Build #317
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 2022 Oracle Corporation and/or its affiliates. | |
# Licensed under the Universal Permissive License v 1.0 as shown at | |
# https://oss.oracle.com/licenses/upl. | |
name: CI Build | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 5 * * *" | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
ci: | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11.x"] | |
poetry-version: ["1.5.0"] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Get Docker Images | |
shell: bash | |
run: | | |
docker pull gcr.io/distroless/java17-debian11 | |
uname -a | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'zulu' | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Cache Maven packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Install Poetry | |
shell: bash | |
run: | | |
pip install poetry==${{ matrix.poetry-version }} | |
- name: Install Dependencies | |
run: python -m poetry install | |
- name: Configure Validation | |
run: python -m poetry run make validate-setup | |
- name: Validate Sources | |
run: python -m poetry run make validate | |
- name: Run test | |
shell: bash | |
run: | | |
python -m poetry run ./tests/scripts/run-tests.sh |