-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Theodo-UK/build/ci-app
build(app): CI
- Loading branch information
Showing
8 changed files
with
1,997 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: app-ci | ||
run-name: ${{ github.actor }} is executing ${{ github.workflow }} on ${{ github.event_name }} at ${{ github.sha }} | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
paths: | ||
- front/** | ||
|
||
defaults: | ||
run: | ||
working-directory: front | ||
|
||
jobs: | ||
app-ci: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout main | ||
uses: actions/checkout@v3 | ||
- name: Setup Node 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install dependencies | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: --cwd front install # front/yarn install | ||
- name: Check linting | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: --cwd front lint # front/yarn lint | ||
- name: Check tests | ||
uses: borales/actions-yarn@v4 | ||
with: | ||
cmd: --cwd front test # front/yarn test | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/* eslint-disable @typescript-eslint/no-var-requires */ | ||
const nextJest = require("next/jest"); | ||
|
||
// Providing the path to your Next.js app which will enable loading next.config.js and .env files | ||
const createJestConfig = nextJest({ dir: "./" }); | ||
|
||
// Any custom config you want to pass to Jest | ||
const customJestConfig = { | ||
testEnvironment: "jest-environment-jsdom", | ||
roots: ["<rootDir>/src"], | ||
}; | ||
|
||
// createJestConfig is exported in this way to ensure that next/jest can load the Next.js configuration, which is async | ||
module.exports = createJestConfig(customJestConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import "@testing-library/jest-dom"; | ||
|
||
jest.mock("../../data/LogsData.ts", () => ({ | ||
getLogs: jest.fn(() => Promise.resolve([])), | ||
})); | ||
|
||
describe("Home", () => { | ||
it("temporary test to check CI testing", async () => { | ||
expect(1).toEqual(1); | ||
}); | ||
}); |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.