Skip to content

Commit

Permalink
tests: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
revolunet committed Dec 13, 2024
1 parent c34cfe5 commit f0794dd
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 75 deletions.
84 changes: 42 additions & 42 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
name: 🌍 Deploy demo
# name: 🌍 Deploy demo

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# on:
# push:
# branches: ["main"]
# pull_request:
# branches: ["main"]

concurrency:
cancel-in-progress: true
group: deploy-${{ github.ref }}
# concurrency:
# cancel-in-progress: true
# group: deploy-${{ github.ref }}

jobs:
build:
name: Deployment demo on gh-pages
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
# jobs:
# build:
# name: Deployment demo on gh-pages
# runs-on: ubuntu-latest
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "yarn"
# - name: Install NodeJS
# uses: actions/setup-node@v4
# with:
# node-version: "20"
# cache: "yarn"

- name: Install dependencies
run: |
yarn --immutable
# - name: Install dependencies
# run: |
# yarn --immutable

- name: Build
env:
NODE_ENV: production # JS build mode
PRODUCTION: true # for environment (ex: robots.txt)
SENTRY_URL: https://sentry.incubateur.net
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: betagouv
SENTRY_PROJECT: albert-docs
SENTRY_RELEASE_UPLOAD: true
run: |
yarn build
touch out/.nojekyll
# - name: Build
# env:
# NODE_ENV: production # JS build mode
# PRODUCTION: true # for environment (ex: robots.txt)
# SENTRY_URL: https://sentry.incubateur.net
# SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
# SENTRY_ORG: betagouv
# SENTRY_PROJECT: albert-docs
# SENTRY_RELEASE_UPLOAD: true
# run: |
# yarn build
# touch out/.nojekyll

# deploy build to gh-pages
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out
# # deploy build to gh-pages
# - name: Deploy 🚀
# uses: JamesIves/[email protected]
# with:
# branch: gh-pages
# folder: out
64 changes: 32 additions & 32 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
name: 🤖 Playwright Tests
# name: 🤖 Playwright Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
# on:
# push:
# branches: ["main"]
# pull_request:
# branches: ["main"]

jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm install -g yarn && yarn
- name: Install Playwright Browsers
run: yarn playwright install --with-deps
- name: Build app
run: yarn build
env:
NEXT_PUBLIC_BASE_PATH: ""
NODE_ENV: production
- name: Run Playwright tests
run: yarn playwright test
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
# jobs:
# test:
# timeout-minutes: 20
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-node@v4
# with:
# node-version: 18
# - name: Install dependencies
# run: npm install -g yarn && yarn
# - name: Install Playwright Browsers
# run: yarn playwright install --with-deps
# - name: Build app
# run: yarn build
# env:
# NEXT_PUBLIC_BASE_PATH: ""
# NODE_ENV: production
# - name: Run Playwright tests
# run: yarn playwright test
# - uses: actions/upload-artifact@v4
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30
2 changes: 1 addition & 1 deletion tests-vitest/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ import React from "react";
test("Has index page", () => {
render(<Page />);
expect(
screen.getByRole("heading", { level: 1, name: "Template" })
screen.getByRole("heading", { level: 1, name: "albert-docs" })
).toBeDefined();
});

0 comments on commit f0794dd

Please sign in to comment.