Skip to content

antarcticrainforest is testing the cli 🧉 #868

antarcticrainforest is testing the cli 🧉

antarcticrainforest is testing the cli 🧉 #868

Workflow file for this run

name: CLI Test
run-name: ${{ github.actor }} is testing the cli 🧉
on: [push, workflow_call]
jobs:
linting-and-testing:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
-
name: Install packages
run: |
python3 -m pip install tox
mkdir .mypy_cache
-
name: Running tests with tox
run: tox -p 3 --parallel-no-spinner
deployment-image-linux:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps:
-
name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Python 3.X
uses: actions/setup-python@v4
with:
python-version: "3.X"
-
name: Get tag
id: repository
run: |
echo "tag=$(python src/freva_deployment/__init__.py -v)" >> $GITHUB_OUTPUT
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
-
name: Create Buildx builder
run: docker buildx create --use --name mybuilder --driver docker-container
-
name: Inspect Buildx builder
run: docker buildx inspect --bootstrap
-
name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
-
name: Build and push deployment image
uses: docker/build-push-action@v4
with:
push: true
build-args: VERSION=${{steps.repository.outputs.tag}}
tags: |
ghcr.io/freva-clint/freva-deployment:${{ steps.repository.outputs.tag }}
ghcr.io/freva-clint/freva-deployment:latest
platforms: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/ppc64le,linux/i386
vault-test:
name: Simple functional tests for the vault image
runs-on: ubuntu-latest
strategy:
matrix:
include:
- arch: linux/amd64
- arch: linux/arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
- name: Create Buildx builder
run: docker buildx create --use --name mybuilder --driver docker-container
- name: Inspect Buildx builder
run: docker buildx inspect --bootstrap
- name: Build vault image
uses: docker/build-push-action@v4
with:
context: assets/share/freva/deployment/vault/
platforms: ${{matrix.arch}}
push: false
load: true
tags: vault
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Check vault image
run: python3 assets/share/freva/deployment/vault/checks.py