Skip to content

Commit

Permalink
Merge branch 'develop' into mai/fix-cookie-weeklyapi
Browse files Browse the repository at this point in the history
  • Loading branch information
chris-nowicki committed May 30, 2024
2 parents 5ce141f + a4b7a50 commit e5d18b6
Show file tree
Hide file tree
Showing 25 changed files with 477 additions and 445 deletions.
11 changes: 0 additions & 11 deletions .dockerignore

This file was deleted.

3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
NEXT_PUBLIC_APPWRITE_API_URL=
NEXT_PUBLIC_APPWRITE_PROJECT_ID=
NEXT_PUBLIC_APPWRITE_DATABASE_ID=
129 changes: 63 additions & 66 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,74 +1,71 @@
name: LGT Docker Build and Push Image
name: LGT Jest & Playwright Tests

on:
pull_request:
branches: [develop]
pull_request:
types: [opened, synchronize, reopened]

jobs:
build-and-push:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/[email protected]
jest-test:
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_APPWRITE_API_URL: ${{ secrets.NEXT_PUBLIC_APPWRITE_API_URL }}
NEXT_PUBLIC_APPWRITE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_APPWRITE_PROJECT_ID }}
NEXT_PUBLIC_APPWRITE_DATABASE_ID: ${{ secrets.NEXT_PUBLIC_APPWRITE_DATABASE_ID }}
strategy:
matrix:
node-version: ['20.x']

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: pnpm/action-setup@v2
with:
version: 8

- name: Build and push Docker image
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile.dev
push: true
tags: ghcr.io/letsgettechnical/image:dev
#A workflow is for testing
jest-test:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: tests
run: pnpm test
#Playwright Testing
playwright-test:
timeout-minutes: 60000
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
- name: Install dependencies
run: npm install -g pnpm && pnpm install
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: pnpm exec playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'

- name: Install dependencies
run: pnpm install
- name: tests
run: pnpm test

test_setup:
name: Test setup
runs-on: ubuntu-latest
outputs:
preview_url: ${{ steps.waitForVercelPreviewDeployment.outputs.url }}
steps:
- name: Wait for Vercel Preview
uses: patrickedqvist/[email protected]
id: waitForVercelPreviewDeployment
with:
token: ${{ secrets.GITHUB_TOKEN }}
max_timeout: 600

test_e2e:
needs: test_setup
name: Playwright Tests
timeout-minutes: 5
runs-on: ubuntu-latest
env:
NEXT_PUBLIC_APPWRITE_API_URL: ${{ secrets.NEXT_PUBLIC_APPWRITE_API_URL }}
NEXT_PUBLIC_APPWRITE_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_APPWRITE_PROJECT_ID }}
NEXT_PUBLIC_APPWRITE_DATABASE_ID: ${{ secrets.NEXT_PUBLIC_APPWRITE_DATABASE_ID }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: lts/*
- run: npm install -g pnpm && pnpm install
- run: pnpm exec playwright install --with-deps
- run: pnpm exec playwright test
- name: Upload Artifacts
uses: actions/upload-artifact@v2
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
.env
.env.local

# vercel
.vercel
Expand Down
25 changes: 0 additions & 25 deletions Dockerfile.dev

This file was deleted.

32 changes: 0 additions & 32 deletions Dockerfile.prod

This file was deleted.

29 changes: 29 additions & 0 deletions ISSUETEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
## LGT GridIron Project

## Issue Title:
[Concisely summarize the issue or feature request in a few words]

## Description:
[Provide an overview of the issue or feature request, including relevant context or background information that helps in understanding the problem. Additionally, include any pertinent details such as workaround solutions, related issues, etc.]

## Steps to Reproduce (for bugs):
[If applicable, provide a clear set of steps to reproduce the issue. This helps developers understand and fix the problem more effectively.]

## Expected Behavior:
[Describe what you expected to happen when performing the steps above.]

## Actual Behavior:
[Describe what happens when performing the steps above.]

## Testing Requirements:
- [ ] Unit testing for code changes and updates.
- [ ] End-to-end (e2e) testing for code changes and updates.

## Screenshots / Logs (if applicable):
[Attach any relevant screenshots or log files that help illustrate the issue.]

## Labels:
[Specify any labels that apply to this issue, such as "bug", "enhancement", "documentation", etc.]

## And Remember
![Screenshot](/public/assets/storybook/shashi.png)
Loading

0 comments on commit e5d18b6

Please sign in to comment.