antarcticrainforest is testing the cli 🧉 #348
Workflow file for this run
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: CLI Test | |
run-name: ${{ github.actor }} is testing the cli 🧉 | |
# Set the access for individual scopes, or use permissions: write-all | |
permissions: | |
pull-requests: write | |
on: [push, pull_request] | |
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 | |
vault-test: | |
name: Simple functional tests for the vault image | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build vault image | |
uses: docker/build-push-action@v4 | |
with: | |
context: assets/share/freva/deployment/vault/ | |
platforms: linux/amd64 | |
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 | |
dependabot: | |
name: Merge PR by dependabot | |
runs-on: ubuntu-latest | |
needs: [linting-and-testing, vault-test] | |
# Specifically check that dependabot (or another trusted party) created this pull-request, and that it has been labelled correctly. | |
if: github.event.pull_request.user.login == 'dependabot[bot]' | |
steps: | |
- name: Dependabot metadata | |
id: metadata | |
uses: dependabot/fetch-metadata@v1 | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Approve dependabot's PR | |
run: gh pr review --approve "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.TOKEN}} | |
- name: Auto-merge for dependabot's PR | |
run: gh pr merge --merge --auto "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.TOKEN}} |