Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
keellyp committed Sep 6, 2024
1 parent 3d05c86 commit 9b05e69
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 251 deletions.
110 changes: 55 additions & 55 deletions .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
name: Run Codegen

on:
pull_request:
types: [opened, reopened, review_requested, ready_for_review, synchronize]
workflow_dispatch:
inputs:
api_branch:
description: Api Branch
required: true
default: 'main'

jobs:
codegen:
if: github.event.pull_request.draft == false
name: Run Codegen
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4

- name: Checkout API Git repository
uses: actions/checkout@v4
with:
repository: getlago/lago-api
ref: ${{ github.event.inputs.api_branch }}
path: api
token: ${{ secrets.GH_TOKEN }}

- name: Build API local image
run: |
docker build -t getlago/api:ci ./api
- name: Generate API RSA Key
run: |
echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | base64`\"" >> .env
- name: Launch API
run: docker compose -f ./ci/docker-compose.ci.yml --env-file ./.env up -d api

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Node.js dependencies
run: yarn

- name: Run codegen
env:
CODEGEN_API: http://localhost:3000/graphql
run: |
yarn codegen
- name: Run Typescript
run: yarn tsc
# name: Run Codegen

# on:
# pull_request:
# types: [opened, reopened, review_requested, ready_for_review, synchronize]
# workflow_dispatch:
# inputs:
# api_branch:
# description: Api Branch
# required: true
# default: 'main'

# jobs:
# codegen:
# if: github.event.pull_request.draft == false
# name: Run Codegen
# runs-on: ubuntu-latest
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v4

# - name: Checkout API Git repository
# uses: actions/checkout@v4
# with:
# repository: getlago/lago-api
# ref: ${{ github.event.inputs.api_branch }}
# path: api
# token: ${{ secrets.GH_TOKEN }}

# - name: Build API local image
# run: |
# docker build -t getlago/api:ci ./api

# - name: Generate API RSA Key
# run: |
# echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | base64`\"" >> .env

# - name: Launch API
# run: docker compose -f ./ci/docker-compose.ci.yml --env-file ./.env up -d api

# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20

# - name: Install Node.js dependencies
# run: yarn

# - name: Run codegen
# env:
# CODEGEN_API: http://localhost:3000/graphql
# run: |
# yarn codegen
# - name: Run Typescript
# run: yarn tsc
8 changes: 6 additions & 2 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
runs-on: ubuntu-latest
env:
ACTIONS_STEP_DEBUG: true
ACTIONS_RUNNER_DEBUG: true
steps:
- name: Check out Git repository
uses: actions/checkout@v4
Expand All @@ -31,12 +32,15 @@ jobs:
run: |
docker build -t getlago/api:ci ./api
- name: Generate API RSA Key
run: |
echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | base64`\"" >> .env
- name: Launch APP + API
env:
LAGO_RSA_PRIVATE_KEY: ${{ secrets.LAGO_RSA_PRIVATE_KEY }}
LAGO_LICENSE: ${{ secrets.LAGO_LICENSE }}
run: |
docker compose -f ./ci/docker-compose.ci.yml up -d db redis api front
docker compose -f ./ci/docker-compose.ci.yml --env-file ./.env up -d db redis api front
- name: Set up Node.js
uses: actions/setup-node@v4
Expand Down
34 changes: 17 additions & 17 deletions .github/workflows/lago-internal.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: "Lago Internal"
on:
push:
branches:
- main
jobs:
lago-internal:
name: Lago Internal
runs-on: ubuntu-latest
steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.GH_TOKEN}}
repository: getlago/lago-deploy
event-type: front-push-main
client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
# name: "Lago Internal"
# on:
# push:
# branches:
# - main
# jobs:
# lago-internal:
# name: Lago Internal
# runs-on: ubuntu-latest
# steps:
# - name: Repository Dispatch
# uses: peter-evans/repository-dispatch@v2
# with:
# token: ${{ secrets.GH_TOKEN}}
# repository: getlago/lago-deploy
# event-type: front-push-main
# client-payload: '{"ref": "${{ github.ref }}", "sha": "${{ github.sha }}"}'
58 changes: 29 additions & 29 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
name: Lint
# name: Lint

on:
pull_request:
types: [opened, reopened, review_requested, ready_for_review, synchronize]
# on:
# pull_request:
# types: [opened, reopened, review_requested, ready_for_review, synchronize]

jobs:
run-linters:
name: Run linters
runs-on: ubuntu-latest
steps:
- name: Check out Git repository
uses: actions/checkout@v4
# jobs:
# run-linters:
# name: Run linters
# runs-on: ubuntu-latest
# steps:
# - name: Check out Git repository
# uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
# - name: Set up Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 20

# ESLint and Prettier must be in `package.json`
- name: Install Node.js dependencies
run: yarn
# # ESLint and Prettier must be in `package.json`
# - name: Install Node.js dependencies
# run: yarn

- name: Run linters
uses: wearerequired/lint-action@v2
with:
eslint: true
eslint_extensions: js,ts,tsx
continue_on_error: false
prettier: true
prettier_extensions: ts,tsx,svg,html
# - name: Run linters
# uses: wearerequired/lint-action@v2
# with:
# eslint: true
# eslint_extensions: js,ts,tsx
# continue_on_error: false
# prettier: true
# prettier_extensions: ts,tsx,svg,html

- name: Run Translation Check
run: |
yarn translations:inspect
# - name: Run Translation Check
# run: |
# yarn translations:inspect
Loading

0 comments on commit 9b05e69

Please sign in to comment.