Skip to content

Commit

Permalink
ci: upgrade to yarn 3.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pyphilia committed Aug 3, 2021
1 parent 5de2e21 commit cf4423e
Show file tree
Hide file tree
Showing 10 changed files with 21,607 additions and 15,645 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
name: Cypress tests
name: cypress tests
on: [push]
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
- name: checkout
uses: actions/checkout@v2

- name: Install
# network-concurrency 1 is necessary to avoid errors when using github packages
run: yarn cache clean && rm yarn.lock && yarn install --network-concurrency 1
- name: set up node
uses: actions/setup-node@v2
with:
node-version: '14'
cache: 'yarn'

- name: install yarn
# avoid checksum errors with github packages
run: YARN_CHECKSUM_BEHAVIOR=update yarn

- name: Cypress run
- name: cypress run
uses: cypress-io/github-action@v2
env:
REACT_APP_API_HOST: ${{ secrets.REACT_APP_API_HOST }}
Expand All @@ -27,5 +33,5 @@ jobs:
headless: true
quiet: true

- name: Coverage Report
- name: coverage report
run: npx nyc report --reporter=text-summary
7 changes: 1 addition & 6 deletions .github/workflows/deployProd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@ jobs:

- name: yarn set up
uses: actions/setup-node@v2

# as long as github dependencies / dependencies with prepare scripts are needed
# this script might encounter trouble when installing
# https://github.com/yarnpkg/yarn/issues/6312
- run: rm yarn.lock
- run: yarn install --network-concurrency 1
- run: yarn
- run: yarn build

- name: configure aws credentials
Expand Down
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,11 @@ cypress/videos

# jetbrains
.idea

# yarn
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
1 change: 0 additions & 1 deletion .npmrc

This file was deleted.

631 changes: 631 additions & 0 deletions .yarn/releases/yarn-3.0.1-rc.1.cjs

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nodeLinker: node-modules

yarnPath: .yarn/releases/yarn-3.0.1-rc.1.cjs
defaultSemverRangePrefix: ''
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Installation

1. Run `yarn` to install the dependencies
1. Run `yarn` to install the dependencies. You might need to run `YARN_CHECKSUM_BEHAVIOR=update yarn` if you run into checksum errors. This is due to github packages being updated in the midtime and don't match with `yarn.lock` anymore. This error should disappear when using releases or tags (instead of branches).
2. Run the API at `localhost:3000`
3. Set the following environnement variables in `.env.local`

Expand Down
9 changes: 6 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"private": true,
"license": "AGPL-3.0-only",
"dependencies": {
"@graasp/query-client": "git://github.com/graasp/graasp-query-client.git#main",
"@graasp/ui": "git://github.com/graasp/graasp-ui.git#master",
"@graasp/query-client": "git://github.com/graasp/graasp-query-client.git#yarn2",
"@graasp/ui": "git://github.com/graasp/graasp-ui.git#yarn2",
"@material-ui/core": "4.11.2",
"@material-ui/icons": "4.11.2",
"@material-ui/lab": "4.0.0-alpha.57",
Expand Down Expand Up @@ -94,8 +94,10 @@
"cypress-file-upload": "5.0.2",
"cypress-localstorage-commands": "1.4.5",
"env-cmd": "10.1.0",
"eslint": "^7.31.0",
"eslint-config-airbnb": "18.2.1",
"eslint-config-prettier": "7.1.0",
"eslint-config-react-app": "^6.0.0",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-jsx-a11y": "6.4.1",
"eslint-plugin-react": "7.22.0",
Expand All @@ -113,5 +115,6 @@
"exclude": [
"src/serviceWorker.js"
]
}
},
"packageManager": "[email protected]"
}
11 changes: 4 additions & 7 deletions src/components/main/ItemScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,11 @@ const ItemScreen = () => {
memberId: currentMember?.get('id'),
});

useEffect(
() => {
setEditingItemId(null);
setIsItemSettingsOpen(false);
},
useEffect(() => {
setEditingItemId(null);
setIsItemSettingsOpen(false);
// eslint-disable-next-line react-hooks/exhaustive-deps
[itemId],
);
}, [itemId]);

if (!itemId || !item || isError) {
return <ErrorAlert />;
Expand Down
Loading

0 comments on commit cf4423e

Please sign in to comment.