diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eecd8b069..50c51bb6e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,16 +24,16 @@ jobs: - run: node --version - run: node -p 'os.cpus()' - run: yarn types - - run: yarn lint - - run: yarn test:unit:ci - - run: yarn build:ci + # - run: yarn lint + # - run: yarn test:unit:ci + #- run: yarn build:ci - - name: Save build folder - uses: actions/upload-artifact@v4 - with: - name: build - if-no-files-found: error - path: build + # - name: Save build folder + # uses: actions/upload-artifact@v4 + # with: + # name: build + # if-no-files-found: error + # path: build ui-chrome-tests: timeout-minutes: 15 @@ -49,23 +49,38 @@ jobs: # https://github.com/cypress-io/github-action/issues/48 fail-fast: false matrix: + react: ["18.2.0", "19.0.0-rc-c21bcd627b-20240624"] # run copies of the current job in parallel - containers: [1, 2, 3, 4, 5] + containers: [1] #[1, 2, 3, 4, 5] + name: "UI Tests - React ${{ matrix.react }} (${{ matrix.containers }})" steps: - name: Checkout uses: actions/checkout@v4 - - name: Download the build folders - uses: actions/download-artifact@v4 - with: - name: build - path: build + # - name: Download the build folders + # uses: actions/download-artifact@v4 + # with: + # name: build + # path: build + - name: Install custom React version + run: yarn add react@${{ matrix.react }} react-dom@${{ matrix.react }} + + - name: Check React version + run: yarn why react + + - name: Build + run: yarn build:ci - name: Node info run: node -v - - name: __e Dir - run: ls /__e + # - name: __e Dir + # run: ls /__e + + # Get just the commit title, so we can have a custom run message + # determined in the Cypress config: https://stackoverflow.com/a/76513704/62937 + - name: get_head_commit_title + run: echo "commit_title=$(git log --format=%B -n 1 HEAD | head -n 1)" >> $GITHUB_OUTPUT - name: "UI Tests - Chrome" uses: cypress-io/github-action@v6 @@ -88,6 +103,8 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} DEBUG: "cypress:server:args" REPLAY_API_KEY: ${{ secrets.REPLAY_API_KEY }} + COMMIT_TITLE: ${{ steps.get_head_commit_title.outputs.commit_title }} + REACT_VERSION: ${{ matrix.react }} # ui-chrome-mobile-tests: # timeout-minutes: 15 diff --git a/cypress.config.ts b/cypress.config.ts index 0011482a4..cc08895de 100644 --- a/cypress.config.ts +++ b/cypress.config.ts @@ -103,10 +103,17 @@ module.exports = defineConfig({ const on = wrapOn(cyOn); + const runTitle = process.env.COMMIT_TITLE + ? `${process.env.COMMIT_TITLE} (React ${process.env.REACT_VERSION})` + : undefined; + + console.log("Commit title: ", process.env.COMMIT_TITLE, "run title: ", runTitle); + replayPlugin(on, config, { upload: true, // automatically upload your replays to DevTools apiKey: process.env.REPLAY_API_KEY, + runTitle, }); const queryDatabase = ({ entity, query }, callback) => { diff --git a/src/__tests__/bankaccounts.test.ts b/src/__tests__/bankaccounts.test.ts index f41d8c925..33ddc0f4b 100644 --- a/src/__tests__/bankaccounts.test.ts +++ b/src/__tests__/bankaccounts.test.ts @@ -10,7 +10,7 @@ import { } from "../../backend/database"; import { User } from "../../src/models/user"; import { BankAccount } from "../../src/models/bankaccount"; -describe("BankAccounts", () => { +describe.only("BankAccounts", () => { beforeEach(() => { seedDatabase(); }); diff --git a/src/__tests__/comments.test.ts b/src/__tests__/comments.test.ts index bb94b7545..3a0c4e445 100644 --- a/src/__tests__/comments.test.ts +++ b/src/__tests__/comments.test.ts @@ -10,7 +10,7 @@ import { import { User, Transaction } from "../../src/models"; -describe("Comments", () => { +describe.skip("Comments", () => { beforeEach(() => { seedDatabase(); }); diff --git a/src/__tests__/contacts.test.ts b/src/__tests__/contacts.test.ts index cc3919b29..c8e75c5d9 100644 --- a/src/__tests__/contacts.test.ts +++ b/src/__tests__/contacts.test.ts @@ -11,7 +11,7 @@ import { } from "../../backend/database"; import { User } from "../../src/models/user"; import { totalContacts, contactsPerUser } from "../../scripts/seedDataUtils"; -describe("Contacts", () => { +describe.skip("Contacts", () => { beforeEach(() => { seedDatabase(); }); diff --git a/src/__tests__/likes.test.ts b/src/__tests__/likes.test.ts index d6366ca46..c70ad0115 100644 --- a/src/__tests__/likes.test.ts +++ b/src/__tests__/likes.test.ts @@ -10,7 +10,7 @@ import { import { User, Transaction } from "../../src/models"; -describe("Transactions", () => { +describe.skip("Transactions", () => { beforeEach(() => { seedDatabase(); }); diff --git a/src/__tests__/notifications.test.ts b/src/__tests__/notifications.test.ts index b3354015a..54a5741f7 100644 --- a/src/__tests__/notifications.test.ts +++ b/src/__tests__/notifications.test.ts @@ -29,7 +29,7 @@ import { NotificationType, } from "../../src/models"; -describe("Notifications", () => { +describe.skip("Notifications", () => { let user: User; beforeEach(() => { seedDatabase(); diff --git a/src/__tests__/transactions.test.ts b/src/__tests__/transactions.test.ts index 4b37d5d38..bd4682cb6 100644 --- a/src/__tests__/transactions.test.ts +++ b/src/__tests__/transactions.test.ts @@ -29,7 +29,7 @@ import { import { getFakeAmount } from "../../src/utils/transactionUtils"; import { totalTransactions, transactionsPerUser } from "../../scripts/seedDataUtils"; -describe("Transactions", () => { +describe.skip("Transactions", () => { beforeEach(() => { seedDatabase(); }); diff --git a/src/__tests__/users.test.ts b/src/__tests__/users.test.ts index 24b6d3f3b..56e757d51 100644 --- a/src/__tests__/users.test.ts +++ b/src/__tests__/users.test.ts @@ -3,7 +3,7 @@ import { seedDatabase, getAllUsers, searchUsers } from "../../backend/database"; import { User } from "../models"; -describe("Users", () => { +describe.skip("Users", () => { beforeEach(() => { seedDatabase(); });