Skip to content

Add github action with e2e tests #8

Add github action with e2e tests

Add github action with e2e tests #8

Workflow file for this run

name: E2E tests
on:
pull_request:
workflow_dispatch:
inputs:
uninstall_fm:
description: 'Option to uninstall Frinx-machine'
required: true
default: 'true'
host:
description: 'frinx-machine helm-chart branch'
required: true
default: 'main'
jobs:
trigger-e2e-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
# - name: Set short git commit SHA
# id: vars
# run: |
# calculatedSha=$(git rev-parse --short HEAD)
# echo "::set-output name=short_sha::$calculatedSha"
- name: Save sha
id: var
run: |
calculatedSha=$(git rev-parse --short HEAD)
latestVersion=$(git describe --tags --abbrev=0 --match="v[0-9]*" | sed -e 's/^v//')
echo "short_sha=$calculatedSha" >> $GITHUB_OUTPUT
echo "latest_version=$latestVersion" >> $GITHUB_OUTPUT
echo "image_tag=$latestVersion-$calculatedSha" >> $GITHUB_OUTPUT
- name: Confirm git commit SHA output
run: |
echo ${{ steps.var.outputs.short_sha }}
echo ${{ steps.var.outputs.latest_version }}
echo ${{ steps.var.outputs.image_tag }}
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_HUB_USERNAME }}
# password: ${{ secrets.DOCKER_HUB_PASSWORD }}
# - name: Setup Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build and push latest
# id: docker_build
# env:
# TAG: ${{ steps.sha.outputs.short_sha }}
# uses: docker/build-push-action@v4
# with:
# push: true
# tags: |
# frinx/frinx-frontend:${{ env.TAG }}
# build-args: |
# COMMIT_HASH=${{ github.sha }}
# PRIVATE_GH_TOKEN=${{ secrets.PACKAGE_TOKEN }}
# PRIVATE_NPM_TOKEN=${{ secrets.PUBLISH_TOKEN }}