Suites e2e #48
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: Automock E2E | |
on: | |
workflow_dispatch: | |
inputs: | |
target_branch: | |
description: 'E2E Target Branch' | |
required: true | |
jobs: | |
build: | |
name: Build, Prepare and Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
e2e-project: ['e2e/jest/nestjs', 'e2e/sinon/nestjs'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.inputs.target_branch }} | |
- name: Use Node 16.x | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: Yarn | |
run: yarn --frozen-lockfile | |
- name: Build | |
run: yarn build | |
- name: Pack | |
run: lerna exec -- npm pack | |
- name: Move Tarballs | |
run: | | |
mkdir -p $PWD/${{ matrix.e2e-project }}/tarballs | |
lerna exec -- mv "*.tgz" $PWD/${{ matrix.e2e-project }}/tarballs | |
- name: Extract & Copy Tarballs | |
run: | | |
for file in ./tarballs/automock-*.tgz; do | |
[[ $file =~ automock-(.+)-[0-9]+\.[0-9]+\.[0-9]+\.tgz ]] | |
new_name="${BASH_REMATCH[1]}.tgz" | |
mv "$file" $PWD/tarballs/$new_name | |
done | |
working-directory: ${{ matrix.e2e-project }} | |
- name: Install Packages in E2E | |
run: npm install --no-package-lock --no-cache | |
working-directory: ${{ matrix.e2e-project }} | |
- name: Test e2e | |
run: npm run test | |
working-directory: ${{ matrix.e2e-project }} |