-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (28 loc) · 1.09 KB
/
docker-build.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
name: HLink Docker CI
on: [pull_request, push]
env:
HLINK_TAG: hlink:githubactions
jobs:
build:
strategy:
fail-fast: false
matrix:
python_version: ["3.10", "3.11", "3.12"]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build the Docker image
run: docker build . --file Dockerfile --tag $HLINK_TAG-${{ matrix.python_version}} --build-arg PYTHON_VERSION=${{ matrix.python_version }}
- name: Check dependency versions
run: |
docker run $HLINK_TAG-${{ matrix.python_version}} python -V
echo "Java version:"
docker run $HLINK_TAG-${{ matrix.python_version}} java -version
- name: Check formatting with black
run: docker run $HLINK_TAG-${{ matrix.python_version}} black --check .
- name: Lint with flake8
run: docker run $HLINK_TAG-${{ matrix.python_version}} flake8 --count .
- name: Test
run: docker run $HLINK_TAG-${{ matrix.python_version}} pytest
- name: Build sdist and wheel
run: docker run $HLINK_TAG-${{ matrix.python_version}} python -m build