Skip to content

Commit

Permalink
chore: made it quicker and made testing seprate
Browse files Browse the repository at this point in the history
  • Loading branch information
eveeifyeve committed Apr 13, 2024
1 parent 93c101e commit 1ec207e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 10 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ env:

jobs:
quality:
name: Quality & Checks
name: Quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- uses: actions/checkout@v4

- uses: biomejs/setup-biome@v2
with:
version: latest
- name: Run Biome
Expand All @@ -38,11 +37,26 @@ jobs:
run: bun install

- name: Check Quality
run: bun check
run: bunx @biomejs/biome check . && bunx stylelint 'src/styles/**/*.css' && bunx astro check

testing:
name: Testing
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Deps
run: bun install

- name: Run Testing
run: bun test

build:
name: Building
needs: [quality]
needs: [quality,testing]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
6 changes: 3 additions & 3 deletions tests/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ test("Website Online", async () => {
cwd: path.resolve(__dirname, "../"),
});

Check failure on line 13 in tests/index.test.ts

View workflow job for this annotation

GitHub Actions / Testing

error: launch: launch: Executable doesn't exist at /home/runner/.cache/ms-playwright/chromium-1112/chrome-linux/chrome

at /home/runner/work/Website/Website/tests/index.test.ts:13:40
await new Promise((resolve) => setTimeout(resolve, 3000));
await new Promise((resolve) => setTimeout(resolve, 2500));

const browser = await chromium.launch();
const context = await browser.newContext();
Expand All @@ -34,13 +34,13 @@ for (const browserType of browsers) {
cwd: path.resolve(__dirname, "../"),
});

await new Promise((resolve) => setTimeout(resolve, 3000));
await new Promise((resolve) => setTimeout(resolve, 2500));

// Puppiteer goes to Local Instance
const browser = await browserType.launch();
const context = await browser.newContext();
const page = await context.newPage();
const response = await page.goto(TeaClientLocal);
await page.goto(TeaClientLocal);

// Main SEO Check
const ogTitle = await page.$eval('meta[property="og:title"]', (el) =>
Expand Down

0 comments on commit 1ec207e

Please sign in to comment.