Skip to content

Module 3 practice

Module 3 practice #13

Workflow file for this run

name: Module 3
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
IMAGE_MAIN_NAME: nlp-sample
IMAGE_MAIN_TAG: latest
IMAGE_AIM_NAME: aim
IMAGE_AIM_TAG: latest
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
# See explanation: https://github.com/orgs/community/discussions/25678
- name: Clean disk
run: |
rm -rf /opt/hostedtoolcache
- name: Build new
run: |
docker build -f module-3/nlp-sample/Dockerfile -t nlp-sample:latest module-3/nlp-sample
- name: Test style
run: |
docker run nlp-sample:latest make lint
- name: Test code
run: |
docker run nlp-sample:latest make test_code
- name: Test data
run: |
docker run nlp-sample:latest make test_data
- name: Test model
run: |
docker run nlp-sample:latest make test_model
- name: Test all
run: |
docker run -e WANDB_PROJECT=${{ secrets.WANDB_PROJECT }} -e WANDB_API_KEY=${{ secrets.WANDB_API_KEY }} nlp-sample:latest make test_all
# - name: Push
# uses: docker/build-push-action@v2
# with:
# context: week-3/nlp-sample
# file: week-3/nlp-sample/Dockerfile
# push: true
# tags: ${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_MAIN_NAME }}:${{ env.IMAGE_MAIN_TAG }}
# cache-from: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_MAIN_NAME }}:buildcache
# cache-to: type=registry,ref=${{ secrets.DOCKER_HUB_USERNAME }}/${{ env.IMAGE_MAIN_NAME }}:buildcache,mode=max