Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add memory to codebuild #772

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
- name: Run Playwright tests
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
NEXTAUTH_URL: ${{ secrets.NEXTAUTH_URL }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
GITHUB_ID: ${{ secrets.APP_GITHUB_ID }}
GITHUB_SECRET: ${{ secrets.APP_GITHUB_SECRET }}
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
Expand Down
2 changes: 2 additions & 0 deletions cdk/lib/pipeline-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
ShellStep,
} from "aws-cdk-lib/pipelines";
import * as ssm from "aws-cdk-lib/aws-ssm";
import * as codebuild from "aws-cdk-lib/aws-codebuild";

export class PipelineStack extends cdk.Stack {
constructor(scope: Construct, id: string, props: cdk.StackProps) {
Expand Down Expand Up @@ -50,6 +51,7 @@ export class PipelineStack extends cdk.Stack {
codeBuildDefaults: {
cache: Cache.local(LocalCacheMode.DOCKER_LAYER),
buildEnvironment: {
computeType: codebuild.ComputeType.MEDIUM,
privileged: true,
environmentVariables: {
DOCKER_BUILDKIT: {
Expand Down
2 changes: 1 addition & 1 deletion e2e/articles.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ test.describe("Articles", () => {
});

await expect(page.locator(".animate-pulse")).toBeVisible();
await expect(page.locator(".animate-pulse")).not.toBeVisible();
await expect(page.locator(".animate-pulse")).toBeHidden();

const finalArticleCount = await page.$$eval(
"article",
Expand Down
7 changes: 4 additions & 3 deletions e2e/login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test.beforeEach(async ({ page }) => {
test.describe("Login Page", () => {
test("should display the login button", async ({ page }) => {
const loginButton = page.getByRole("button", {
name: "Sign in with GitHub Login",
name: "Login with GitHub",
});
expect(loginButton).toBeTruthy();
});
Expand All @@ -23,13 +23,14 @@ test.describe("Login Page", () => {
page,
}) => {
const button = page.getByRole("button", {
name: "Sign in with GitHub Login",
name: "Login with GitHub",
});

await button.click();
await page.waitForURL("https://github.com/**");

await page.waitForSelector("#login_field");
const loginField = page.locator("#login_field");
await loginField.isVisible();

expect(page.getByLabel("Username or email address")).toBeTruthy();
expect(page.getByLabel("Password")).toBeTruthy();
Expand Down
25 changes: 13 additions & 12 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,22 @@ export default defineConfig({
use: { ...devices["Desktop Chrome"] },
},

{
name: "firefox",
use: { ...devices["Desktop Firefox"] },
},

{
name: "webkit",
use: { ...devices["Desktop Safari"] },
},
// Example other browsers
// {
// name: "firefox",
// use: { ...devices["Desktop Firefox"] },
// },

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// name: "webkit",
// use: { ...devices["Desktop Safari"] },
// },

/* Test against mobile viewports. */
{
name: "Mobile Chrome",
use: { ...devices["Pixel 5"] },
},
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
Expand Down
Loading