chore: bring back e2e testing

This commit is contained in:
Karol Sójko 2022-11-22 15:17:04 +01:00
parent e3b6ac4874
commit 70c829a2c9
No known key found for this signature in database
GPG key ID: A50543BF560BDEB0

View file

@ -130,77 +130,77 @@ jobs:
- name: Test
run: yarn test ${{ inputs.package_path }}
# e2e:
# runs-on: ubuntu-latest
e2e:
runs-on: ubuntu-latest
# needs: build
needs: build
# steps:
# - uses: actions/checkout@v3
steps:
- uses: actions/checkout@v3
# - name: Cache build
# id: cache-build
# uses: actions/cache@v3
# with:
# path: |
# packages/**/dist
# ${{ needs.build.outputs.temp_dir }}
# key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
- name: Cache build
id: cache-build
uses: actions/cache@v3
with:
path: |
packages/**/dist
${{ needs.build.outputs.temp_dir }}
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
# - name: Set up Node
# uses: actions/setup-node@v3
# with:
# registry-url: 'https://registry.npmjs.org'
# node-version-file: '.nvmrc'
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
# - name: Build
# if: steps.cache-build.outputs.cache-hit != 'true'
# run: yarn build ${{ inputs.package_path }}
- name: Build
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn build ${{ inputs.package_path }}
# - name: Bundle
# if: steps.cache-build.outputs.cache-hit != 'true'
# run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ needs.build.outputs.temp_dir }}
- name: Bundle
if: steps.cache-build.outputs.cache-hit != 'true'
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ needs.build.outputs.temp_dir }}
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# - name: Set up QEMU
# uses: docker/setup-qemu-action@master
# with:
# platforms: all
- name: Set up QEMU
uses: docker/setup-qemu-action@master
with:
platforms: all
# - name: Set up Docker Buildx
# id: buildx
# uses: docker/setup-buildx-action@master
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
# - name: Publish Docker image for E2E testing
# uses: docker/build-push-action@v3
# with:
# builder: ${{ steps.buildx.outputs.name }}
# context: ${{ needs.build.outputs.temp_dir }}
# file: ${{ needs.build.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
# platforms: linux/amd64,linux/arm64
# push: true
# tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
- name: Publish Docker image for E2E testing
uses: docker/build-push-action@v3
with:
builder: ${{ steps.buildx.outputs.name }}
context: ${{ needs.build.outputs.temp_dir }}
file: ${{ needs.build.outputs.temp_dir }}/${{ inputs.package_path }}/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
# - name: Run E2E test suite
# uses: convictional/trigger-workflow-and-wait@v1.6.3
# with:
# owner: standardnotes
# repo: e2e
# github_token: ${{ secrets.CI_PAT_TOKEN }}
# workflow_file_name: testing-with-stable-client.yml
# wait_interval: 30
# client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
# propagate_failure: true
# trigger_workflow: true
# wait_workflow: true
- name: Run E2E test suite
uses: convictional/trigger-workflow-and-wait@v1.6.3
with:
owner: standardnotes
repo: e2e
github_token: ${{ secrets.CI_PAT_TOKEN }}
workflow_file_name: testing-with-stable-client.yml
wait_interval: 30
client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
propagate_failure: true
trigger_workflow: true
wait_workflow: true
publish:
needs: [ build, test, lint ]
needs: [ build, test, lint, e2e ]
name: Publish Docker Image
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main