diff --git a/.github/actions/buildx-setup/action.yaml b/.github/actions/buildx-setup/action.yaml new file mode 100644 index 0000000..fb1d0d8 --- /dev/null +++ b/.github/actions/buildx-setup/action.yaml @@ -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}" diff --git a/.github/actions/docker-hub-login/action.yaml b/.github/actions/docker-hub-login/action.yaml new file mode 100644 index 0000000..046e61a --- /dev/null +++ b/.github/actions/docker-hub-login/action.yaml @@ -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 }}' diff --git a/.github/actions/helm-chart-tests/action.yaml b/.github/actions/helm-chart-tests/action.yaml new file mode 100644 index 0000000..c908534 --- /dev/null +++ b/.github/actions/helm-chart-tests/action.yaml @@ -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 diff --git a/.github/actions/integration-tests/action.yaml b/.github/actions/integration-tests/action.yaml new file mode 100644 index 0000000..78aee9f --- /dev/null +++ b/.github/actions/integration-tests/action.yaml @@ -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 diff --git a/.github/actions/unit-tests/action.yaml b/.github/actions/unit-tests/action.yaml new file mode 100644 index 0000000..1f16141 --- /dev/null +++ b/.github/actions/unit-tests/action.yaml @@ -0,0 +1,8 @@ +name: 'Unit tests' +description: 'Execute unit tests' + +runs: + using: "composite" + steps: + - name: Run unit tests + run: ./unit-tests.sh