generated from oracle/template-repo
-
Notifications
You must be signed in to change notification settings - Fork 4
65 lines (56 loc) · 1.6 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# 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@v4
- 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