Merge pull request #171 from ipums/ci_on_all_prs #636
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
name: HLink Docker CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
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: 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 |