Upd: Simplify GitHub actions

This commit is contained in:
Bojan Čekrlić 2022-04-13 13:45:06 +02:00
parent f3554a3eb4
commit 26a784ec68
5 changed files with 70 additions and 0 deletions

View file

@ -0,0 +1,21 @@
name: 'Setup docker buildx'
description: 'Setup docker buildx'
runs:
using: "composite"
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
with:
install: true
- name: Get release version
id: version_number
shell: bash
run: |
echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
echo "::set-output name=RELEASE_VERSION::${GITHUB_REF:10}"

View file

@ -0,0 +1,11 @@
name: 'Setup docker buildx'
description: 'Setup docker buildx'
runs:
using: "composite"
steps:
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: 'boky'
password: '${{ secrets.DOCKER_ACCESS_TOKEN }}'

View file

@ -0,0 +1,8 @@
name: 'Helm chart tests'
description: 'Execute Helm chart tests'
runs:
using: "composite"
steps:
- name: Run HELM chart tests
run: ./helm/tests.sh

View file

@ -0,0 +1,22 @@
name: 'Integration tests'
description: 'Execute integration tests'
runs:
using: "composite"
steps:
- name: Run integration tests
shell: bash
env: # Or as an environment variable
XOAUTH2_RELAYHOST_USERNAME: ${{ secrets.XOAUTH2_RELAYHOST_USERNAME }}
XOAUTH2_CLIENT_ID: ${{ secrets.XOAUTH2_CLIENT_ID }}
XOAUTH2_SECRET: ${{ secrets.XOAUTH2_SECRET }}
XOAUTH2_INITIAL_REFRESH_TOKEN: ${{ secrets.XOAUTH2_INITIAL_REFRESH_TOKEN }}
run: |
echo "RELAYHOST_USERNAME=${XOAUTH2_RELAYHOST_USERNAME}" > integration-tests/xoauth2/.env
echo "FROM=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "TO=${XOAUTH2_RELAYHOST_USERNAME}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_CLIENT_ID=${XOAUTH2_CLIENT_ID}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_SECRET=${XOAUTH2_SECRET}" >> integration-tests/xoauth2/.env
echo "XOAUTH2_INITIAL_REFRESH_TOKEN=${XOAUTH2_INITIAL_REFRESH_TOKEN}" >> integration-tests/xoauth2/.env
cp integration-tests/xoauth2/.env integration-tests/xoauth2-error/.env
./integration-tests.sh

View file

@ -0,0 +1,8 @@
name: 'Unit tests'
description: 'Execute unit tests'
runs:
using: "composite"
steps:
- name: Run unit tests
run: ./unit-tests.sh