Skip to content
This repository has been archived by the owner on Dec 2, 2024. It is now read-only.

Commit

Permalink
chore: revert RP (#80)
Browse files Browse the repository at this point in the history
Co-authored-by: Hugo Masclet <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 16, 2023
1 parent 9e17202 commit 4e14972
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 288 deletions.
125 changes: 32 additions & 93 deletions .github/workflows/artifacts.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,99 +1,42 @@
name: Lint, Test, Build

on:
workflow_call:
inputs:
sha:
description: 'Github sha'
required: true
type: string
ref:
description: 'Github ref'
required: true
type: string
tag_name:
description: 'Github tag_name'
type: string
release_created:
description: 'Github release_created'
type: string
pr_number:
description: 'PR Number'
type: string
pull_request:
branches:
- 'main'
- 'develop'
push:
branches:
- 'main'
- 'develop'

env:
CF_PROJECT_NAME: wallet-universalprofile-cloud
CF_BASE_URL: wallet-universalprofile-cloud

name: build artifacts
jobs:
install:
name: Install
outputs:
node_version: ${{ steps.nodeversion.outputs.content }}
runs-on: ubuntu-latest
steps:
- name: Checkout ${{ inputs.sha }}
uses: actions/checkout@master
with:
ref: ${{ inputs.sha }}
- name: Read .node-version
id: nodeversion
uses: juliangruber/[email protected]
with:
path: ./.node-version
- name: 🎛 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nodeversion.outputs.content }}
cache: 'yarn'

- name: ⚙️ Install
run: yarn

lint:
runs-on: ubuntu-latest
needs: install
if: ${{ inputs.release_created != 'true' }}
name: Lint

test:
timeout-minutes: 60
runs-on: macos-latest
steps:
- name: 🛎️ Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: 🎛 Setup Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.install.outputs.node_version }}
node-version: '18.17.0'
cache: 'yarn'

- name: ⚙️ Install
run: yarn
- name: ⚙️ Install dependencies
run: yarn install

- name: 🎨 Lint JS
- name: 🎨 Lint
run: yarn lint

test:
runs-on: ubuntu-latest
needs: install
name: Tests

steps:
- name: Checkout ${{ inputs.sha }}
uses: actions/checkout@master
with:
ref: ${{ inputs.sha }}
- name: 🎛 Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ needs.install.outputs.node_version }}
cache: 'yarn'
- name: ⚙️ Install
run: yarn

- name: ⚙️ Install Playwright
run: yarn playwright install --with-deps chromium
- name: 🛠 Install Playwright Browsers
run: npx playwright install --with-deps chromium

- name: 🧪 Testing
run: yarn test
- name: 🎯 Run Playwright tests
run: npx playwright test

- uses: actions/upload-artifact@v3
if: always()
Expand All @@ -103,23 +46,20 @@ jobs:
retention-days: 30

deploy:
needs:
- test
- install
runs-on: ubuntu-latest
name: Deploy
needs: test

steps:
- name: Extract branch name
shell: bash
run: |
PR_NUMBER="${{ inputs.pr_number }}"
PR_NUMBER="${{ github.event.number }}"
if [ -n "$PR_NUMBER" ]
then
echo "branch_name=pr-${PR_NUMBER}" >> $GITHUB_OUTPUT
echo "url=https://pr-${PR_NUMBER}.${{ env.CF_BASE_URL }}.pages.dev" >> $GITHUB_OUTPUT
else
if [ "${{ inputs.ref }}" = "refs/heads/develop" ]
if [ "${{ github.ref }}" = "refs/heads/develop" ]
then
echo "branch_name=develop" >> $GITHUB_OUTPUT
echo "url=https://develop.${{ env.CF_BASE_URL }}.pages.dev" >> $GITHUB_OUTPUT
Expand All @@ -130,19 +70,18 @@ jobs:
id: extract_branch

- name: 🛎️ Checkout
- name: Checkout
uses: actions/checkout@v3

- name: 🎛 Setup Node
uses: actions/setup-node@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ needs.install.outputs.node_version }}
node-version: '18.17.0'
cache: 'yarn'

- name: ⚙️ Install
run: yarn
- name: Install
run: yarn install

- name: 🏗️ Build
- name: Build
run: yarn run pages:build

- name: 'Deploy release'
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/release.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .release-please-manifest.json

This file was deleted.

Loading

0 comments on commit 4e14972

Please sign in to comment.