Merge pull request #169 from llnl/checkpoint/02-02-26-new #571
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: Docker Build and Test | |
| on: | |
| push: | |
| pull_request: | |
| branches: [develop, stage-in] | |
| workflow_dispatch: | |
| env: | |
| DOCKER_IMAGE_NAME: datacrumbs-test | |
| DOCKER_TAG: latest | |
| jobs: | |
| docker-build-and-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build Docker image | |
| run: | | |
| docker buildx build \ | |
| --cache-from=type=gha \ | |
| --cache-to=type=gha,mode=max \ | |
| --load \ | |
| -t ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_TAG }} \ | |
| -f infrastructure/docker/Dockerfile \ | |
| . | |
| - name: Run DataCrumbs tests | |
| run: | | |
| docker run --rm \ | |
| -v /lib/modules/:/lib/modules:ro \ | |
| -v /sys/kernel/debug/:/sys/kernel/debug:rw \ | |
| --net=host \ | |
| --pid=host \ | |
| --privileged \ | |
| --cap-add sys_admin \ | |
| --cap-add sys_ptrace \ | |
| --hostname docker \ | |
| -v /sys/fs/bpf:/sys/fs/bpf \ | |
| ${{ env.DOCKER_IMAGE_NAME }}:${{ env.DOCKER_TAG }} \ | |
| bash -c /opt/datacrumbs/infrastructure/docker/test_run.sh |