Skip to content

Commit

Permalink
Merge pull request #88 from Opetushallitus/cra-eject
Browse files Browse the repository at this point in the history
cra eject
  • Loading branch information
tokarls committed May 14, 2024
2 parents 6c29d64 + 5d8baeb commit f95e5a6
Show file tree
Hide file tree
Showing 62 changed files with 15,700 additions and 26,195 deletions.
37 changes: 0 additions & 37 deletions .eslintrc.json

This file was deleted.

43 changes: 10 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,46 +12,30 @@ jobs:
cypress:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Code coverrage cache
uses: actions/cache@v4
env:
cache-name: cache-cypress-coverage
with:
path: cypress-coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.17.0'
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm run install:all
run: npm ci
- name: Install mock-api dependencies
run: cd mock-api && npm ci && cd -
- name: Run Cypress tests
run: npm run cypress:ci

react-build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Code coverrage cache
uses: actions/cache@v4
env:
cache-name: cache-code-coverage
with:
path: coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '16.17.0'
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm run install:all
- name: Run jest
run: npm run test
run: npm ci
- name: Run test
run: npm test
- name: Run react Build
run: npm run build
- name: Set up JDK 21
Expand Down Expand Up @@ -112,13 +96,6 @@ jobs:
with:
path: coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Cypress coverrage cache
uses: actions/cache@v4
env:
cache-name: cache-cypress-coverage
with:
path: cypress-coverage
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
Expand Down
6 changes: 0 additions & 6 deletions .husky/pre-commit

This file was deleted.

8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,11 @@

Huom, lokaalikehitys vaatii paikallisen [backendin](https://github.com/Opetushallitus/koodisto).

Npm install:

`npm run install:all`

Käynnistä dev modessa, sisältäen mock-api:

`npm run dev`
`./start-local-env.sh`

Jest testit:
Nodejs testit:

`npm run test `

Expand Down
28 changes: 28 additions & 0 deletions cypress.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { defineConfig } from 'cypress';

const { rm } = require('fs');

export default defineConfig({
defaultCommandTimeout: 10000,
pageLoadTimeout: 15000,
video: false,
e2e: {
setupNodeEvents(on, config) {
on('task', {
deleteFolder(folderName) {
console.info('deleting folder %s', folderName);
return new Promise((resolve, reject) => {
rm(folderName, { maxRetries: 10, recursive: true, force: true }, (err) => {
if (err) {
console.error(err);
return reject(err);
}
resolve(null);
});
});
},
});
},
baseUrl: 'http://devaaja:devaaja@localhost:3000/',
},
});
6 changes: 0 additions & 6 deletions cypress.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 0 additions & 39 deletions cypress/plugins/index.js

This file was deleted.

1 change: 0 additions & 1 deletion cypress/support/index.js → cypress/support/e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

// Import commands.js using ES2015 syntax:
import './commands';
import '@cypress/code-coverage/support';

// Alternatively you can use CommonJS syntax:
// require('./commands')
22 changes: 0 additions & 22 deletions cypress/tsconfig.json

This file was deleted.

0 comments on commit f95e5a6

Please sign in to comment.