rewrite github actions to build docker instead #22
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: GitHub Actions Docker Build and Test | |
on: | |
push: | |
branches: | |
- main # run tests when pushing to the main branch | |
pull_request: | |
branches: | |
- main # run tests when a pull request targets the main branch | |
jobs: | |
docker-test: | |
runs-on: ubuntu:24.02 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up Docker | |
uses: docker/setup-buildx-action@v2 | |
- name: Build Docker image | |
run: docker build -t reproducible_dl . | |
- name: Run tests inside Docker container | |
run: docker run --rm -it reproducible_dl pytest |