Skip to content

Commit 757bd30

Browse files
authored
build: update dependencies (researchdata-sheffield#173)
* build: change ubuntu to windows in github actions * test: increase timeout for navigation * build: update dependencies Replace deprecated babel-eslint with @babel/eslint-parser. Replace existing katex with gatsby-remark-katex. Disable eslint-plugin-playwright due to runtime error. * build: replace babel/core by @babel/core Use babel-gatsby-preset to speed up production build. * ci: update script * ci: set shell to bash * test: fix tests * ci: update os for the scan workflow
1 parent 363cdac commit 757bd30

File tree

22 files changed

+6977
-13817
lines changed

22 files changed

+6977
-13817
lines changed

.eslintignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
*.e2e.js
2+
*.spec.js

.eslintrc

+9-4
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,13 @@
66
"es6": true,
77
"jest": true
88
},
9-
// https://github.com/babel/babel-eslint
10-
"parser": "babel-eslint",
9+
"parser": "@babel/eslint-parser",
10+
"parserOptions": {
11+
"requireConfigFile": false,
12+
"babelOptions": {
13+
"presets": ["babel-preset-gatsby"]
14+
}
15+
},
1116
"rules": {
1217
// https://eslint.org/docs/2.0.0/rules/strict
1318
"strict": 0
@@ -18,9 +23,9 @@
1823
// https://github.com/yannickcr/eslint-plugin-react#recommended
1924
"plugin:react/recommended",
2025
// https://github.com/benmosher/eslint-plugin-import
21-
"plugin:import/recommended",
26+
"plugin:import/recommended"
2227
// https://github.com/playwright-community/eslint-plugin-playwright
23-
"plugin:playwright/jest-playwright"
28+
//"plugin:playwright/jest-playwright"
2429
],
2530
"settings": {
2631
"react": {

.github/workflows/ci.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,10 @@ on:
1919

2020
jobs:
2121
CI-Build:
22-
runs-on: ubuntu-20.04
22+
runs-on: windows-latest
23+
defaults:
24+
run:
25+
shell: bash
2326
steps:
2427
- name: Cancel Previous Runs
2528
uses: styfle/cancel-workflow-action@0.9.1
@@ -54,7 +57,7 @@ jobs:
5457

5558
# Enable incremental build
5659
- name: Incremental build
57-
run: npm run build
60+
run: NODE_OPTIONS=--max_old_space_size=4096 npm run build:noGA
5861
env:
5962
EVENT_API_KEY_1: ${{ secrets.EVENT_API_KEY_1 }}
6063
EVENT_API_KEY_2: ${{ secrets.EVENT_API_KEY_2 }}
@@ -68,7 +71,10 @@ jobs:
6871
run: npm run serve & npm run test:e2e
6972

7073
Test:
71-
runs-on: ubuntu-20.04
74+
runs-on: windows-latest
75+
defaults:
76+
run:
77+
shell: bash
7278
steps:
7379
- name: Cancel Previous Runs
7480
uses: styfle/cancel-workflow-action@0.9.1

.github/workflows/deploy-qa.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ on:
1616

1717
jobs:
1818
Deploy-to-QA:
19-
runs-on: ubuntu-20.04
19+
runs-on: windows-latest
20+
defaults:
21+
run:
22+
shell: bash
2023
if: ${{ github.event.workflow_run.conclusion == 'success' }}
2124

2225
steps:

.github/workflows/deploy.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ on:
1616
jobs:
1717
deploy:
1818
name: Deploy to GitHub Pages
19-
runs-on: ubuntu-20.04
19+
runs-on: windows-latest
20+
defaults:
21+
run:
22+
shell: bash
2023

2124
steps:
2225
- name: Cancel Previous Runs

.github/workflows/scan.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
scan:
23-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-latest
2424

2525
steps:
2626
- name: Cancel Previous Runs

gatsby-browser.js

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
import "tailwindcss/dist/base.css";
99
import "gitalk/dist/gitalk.css";
10+
import "katex/dist/katex.min.css";
1011
import "slick-carousel/slick/slick.css";
1112
import "slick-carousel/slick/slick-theme.css";
1213
import "prismjs/plugins/line-numbers/prism-line-numbers.css";

gatsby-config.js

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = {
1717
{
1818
resolve: `gatsby-plugin-google-analytics`,
1919
options: {
20-
trackingId: "UA-165060977-1",
20+
trackingId: process.env.QA_ENV ? "289653096" : "UA-165060977-1",
2121
head: true,
2222
enableWebVitalsTracking: true
2323
}
@@ -81,9 +81,15 @@ module.exports = {
8181
posts: require.resolve("./src/templates/blog/blogPostTemplate.jsx"),
8282
docs: require.resolve("./src/templates/docs/docsTemplate.jsx")
8383
},
84-
remarkPlugins: [require("remark-math"), require("remark-html-katex")],
84+
remarkPlugins: [require("remark-math")],
8585
gatsbyRemarkPlugins: [
8686
"gatsby-remark-code-titles",
87+
{
88+
resolve: `gatsby-remark-katex`,
89+
options: {
90+
strict: `ignore`
91+
}
92+
},
8793
`gatsby-remark-embedder`,
8894
{
8995
resolve: `gatsby-remark-embed-video`,

0 commit comments

Comments
 (0)