|
1 | 1 | name: Maven and Python Tests |
2 | | -"on": |
| 2 | +'on': |
3 | 3 | pull_request: |
4 | 4 | types: |
5 | | - - opened |
6 | | - - edited |
7 | | - - synchronize |
8 | | - - reopened |
9 | | -env: |
10 | | - QDRANT_URL: "${{ secrets.QDRANT_URL }}" |
11 | | - QDRANT_API_KEY: "${{ secrets.QDRANT_API_KEY }}" |
| 5 | + - opened |
| 6 | + - edited |
| 7 | + - synchronize |
| 8 | + - reopened |
| 9 | + |
12 | 10 | jobs: |
13 | 11 | test: |
14 | 12 | runs-on: ubuntu-latest |
| 13 | + strategy: |
| 14 | + matrix: |
| 15 | + python-version: |
| 16 | + - '3.8' |
| 17 | + - '3.9' |
| 18 | + - '3.10' |
| 19 | + - '3.11' |
| 20 | + - '3.12' |
15 | 21 | steps: |
16 | | - - uses: actions/checkout@v4 |
17 | | - - uses: actions/setup-java@v3 |
18 | | - with: |
19 | | - java-version: "8" |
20 | | - distribution: temurin |
21 | | - - name: Cache local Maven repository |
22 | | - uses: actions/cache@v3 |
23 | | - with: |
24 | | - path: ~/.m2/repository |
25 | | - key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} |
26 | | - restore-keys: | |
27 | | - ${{ runner.os }}-maven- |
28 | | - - name: Run Maven tests |
29 | | - run: mvn test |
30 | | - - name: Generate JARs |
31 | | - run: mvn clean package -DskipTests |
32 | | - - uses: actions/setup-python@v4 |
33 | | - with: |
34 | | - python-version: '3.11' |
35 | | - cache: 'pip' |
36 | | - - name: Install Python test dependencies |
37 | | - run: pip install -r src/test/python/requirements.txt |
38 | | - - name: Run Python tests |
39 | | - run: pytest |
| 22 | + - uses: actions/checkout@v4 |
| 23 | + - uses: actions/setup-java@v3 |
| 24 | + with: |
| 25 | + java-version: '8' |
| 26 | + distribution: temurin |
| 27 | + - name: Cache local Maven repository |
| 28 | + uses: actions/cache@v3 |
| 29 | + with: |
| 30 | + path: ~/.m2/repository |
| 31 | + key: '${{ runner.os }}-maven-${{ hashFiles(''**/pom.xml'') }}' |
| 32 | + restore-keys: | |
| 33 | + ${{ runner.os }}-maven- |
| 34 | + - name: Generate JAR file |
| 35 | + run: mvn clean package -DskipTests |
| 36 | + - name: Run Maven tests |
| 37 | + run: mvn test |
| 38 | + - uses: actions/setup-python@v4 |
| 39 | + with: |
| 40 | + python-version: '${{ matrix.python-version }}' |
| 41 | + cache: pip |
| 42 | + - name: Install Python test dependencies |
| 43 | + run: pip install -r src/test/python/requirements.txt |
| 44 | + - name: Run Python tests |
| 45 | + run: pytest |
0 commit comments