some more tools #232
This file contains hidden or 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: unit-testing | |
| on: | |
| push: | |
| pull_request: | |
| release: | |
| types: [published] | |
| repository_dispatch: | |
| types: [udf-dispatch] | |
| env: | |
| IMAGE_NAME: force-unit-test | |
| jobs: | |
| testing: | |
| name: Compile in Docker container, and run unit tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Build image | |
| run: | | |
| SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) | |
| export SOURCE_DATE_EPOCH | |
| docker build . --file Dockerfile --tag $IMAGE_NAME --build-arg build=with_tests | |
| - name: Run unit tests | |
| run: docker run --rm -t --user "$(id -u):$(id -g)" $IMAGE_NAME force-unit-testing |