Skip to content

Image Build, Test

Image Build, Test #3

Workflow file for this run

name: Image Build, Test
on:
pull_request:
branches:
- main
workflow_dispatch:
jobs:
docker:
name: "${{ matrix.DEPLOYMENT_NAME }} USE_FROZEN=${{ matrix.USE_FROZEN }} ${{ matrix.CAL_VERSION }} -- Image Build, Test"
runs-on: ubuntu-22.04
strategy:
max-parallel: 3
fail-fast: false
matrix:
DEPLOYMENT_NAME: [ jwebbinar, roman, tike]
USE_FROZEN: [ 1 ]
CAL_VERSION: [ none ]
FREEZE_CHILL: [ 1 ]
OWNER: [ jupyter ]
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Free Disk Space, Enlarge Swapfile
shell: bash
run: |
df -h
sudo apt clean
docker rmi $(docker image ls -aq)
docker container prune -f
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /usr/local/lib/android # will release about 10 GB if you don't need Android
sudo rm -rf /usr/share/dotnet # will release about 20GB if you don't need .NET
sudo swapoff -a
sudo rm -f /swapfile
sudo fallocate -l 24G /swapfile
sudo chmod 0600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
cat /proc/meminfo
df -h
- name: Set Up Environment
shell: bash
run: |
scripts/image-configure ${{ matrix.DEPLOYMENT_NAME }} --use-frozen ${{ matrix.USE_FROZEN }} --freeze-chill ${{ matrix.FREEZE_CHILL }} --cal-version ${{ matrix.CAL_VERSION }} --owner ${{ MATRIX.owner }}
df -h
- name: Image Build
shell: bash
run: |
source setup-env
scripts/image-build
df -h
docker system df
docker system prune
docker image ls
df -h
- name: Git Diffs (Frozen Version Specs)
shell: bash
run: git diff
- name: Image Functional Tests
shell: bash
run: |
df -h
source setup-env
scripts/image-test
df -h
- name: Scan image
uses: anchore/scan-action@v3
with:
fail-build: false
severity-cutoff: high
output-format: table
image: notebook-${{ matrix.DEPLOYMENT_NAME }}