From 58fad637f2d8e8e2a240ac51b67d3bdd1bf77ae5 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Fri, 18 Oct 2024 14:21:21 -0400 Subject: [PATCH] Break up tests: build, bats, bats-nocontainer, docker, mac-nocontainer Should speed up testing. Signed-off-by: Daniel J Walsh --- .github/workflows/ci.yml | 57 +++++++++++++++++++++------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f2be23c..86760b61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,15 +7,15 @@ on: - main jobs: - linux: + build: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - - name: install bats + - name: install shell: bash run: | sudo apt-get update - sudo apt-get install podman bats bash codespell python3-argcomplete pipx + sudo apt-get install podman bash make install-requirements - name: Print disk space before cleanup shell: bash @@ -49,6 +49,20 @@ jobs: - name: run bats run: | make build + + bats: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: install bats + shell: bash + run: | + sudo apt-get update + sudo apt-get install podman bats bash codespell python3-argcomplete pipx + make install-requirements + + - name: run bats + run: | make validate make bats @@ -57,7 +71,7 @@ jobs: pip install tqdm --break-system-packages make bats-nocontainer - docker: + bats-nocontainer: runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -65,35 +79,24 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install bats bash codespell python3-argcomplete pipx + sudo apt-get install podman bats bash codespell python3-argcomplete pipx make install-requirements - - name: Print disk space before cleanup - shell: bash - run: | - df -h - - name: Free Disk Space Linux - shell: bash - run: | - sudo docker rmi "$(docker image ls -aq)" >/dev/null 2>&1 || true - sudo rm -rf \ - /usr/share/dotnet /usr/local/lib/android /opt/ghc \ - /usr/local/share/powershell /usr/share/swift /usr/local/.ghcup \ - /usr/lib/jvm || true - # /mnt has ~ 65 GB free disk space. / is too small. - - name: Reconfigure Docker data-root + - name: bats-nocontainer run: | - sudo mkdir -p /mnt/docker /etc/docker - echo '{"data-root": "/mnt/docker"}' > /tmp/daemon.json - sudo mv /tmp/daemon.json /etc/docker/daemon.json - cat /etc/docker/daemon.json - sudo systemctl restart docker.service - df -h + pip install tqdm --break-system-packages + make bats-nocontainer - - name: Print disk space after cleanup + docker: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: install bats shell: bash run: | - df -h + sudo apt-get update + sudo apt-get install bats bash codespell python3-argcomplete pipx + make install-requirements - name: bats-docker run: |