-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change build system to Vite and upgrade dependencies (#129)
* Change build system to Vite and upgrade dependencies * Update dependencies * Update imports and react router props * Update package lock and development env * remove unused files * restore cypress dependency * Upgrade cypress tests to cypress 13 compatible * Test with updated cata-catalog-components * Move circleCI from dktl to ddev attempt #1 * Add missing param * Add npm install * Fix cypress path * fix cypress baseurl * typo * change to double quotes * simplify config * change to http * Try installing front-end and replacing * Update vite build * Fix cypress tests and skip some those that need a better rewrite * Remove unused CRA files * Update README.md * Fix typo and remove reference to deleted file * Update version number and data-catalog-components version number
- Loading branch information
1 parent
cbc0c3e
commit 22927d8
Showing
42 changed files
with
7,875 additions
and
55,225 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,57 @@ | ||
version: 2 | ||
version: '2.1' | ||
orbs: | ||
docker: circleci/[email protected] | ||
|
||
commands: | ||
install-ddev: | ||
steps: | ||
- run: | ||
name: Install DDev | ||
command: | | ||
set -e | ||
sudo rm -rf /etc/apt/sources.list.d/heroku.list | ||
sudo apt-get update | ||
sudo apt-get install ca-certificates | ||
curl https://apt.fury.io/drud/gpg.key | sudo apt-key add - | ||
echo "deb https://apt.fury.io/drud/ * *" | sudo tee -a /etc/apt/sources.list.d/ddev.list | ||
sudo apt update && sudo apt install -y ddev | ||
jobs: | ||
build: | ||
parallelism: 1 | ||
machine: | ||
image: ubuntu-2004:current | ||
environment: | ||
TEST_RESULTS: /tmp/test-results | ||
DKTL_VERSION: "4.2.11" | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install DKTL | ||
command: | | ||
git clone -b $DKTL_VERSION https://github.com/GetDKAN/dkan-tools.git ~/dkan-tools | ||
echo "export PATH=~/dkan-tools/bin:$PATH" >> $BASH_ENV | ||
- install-ddev | ||
- run: | ||
name: Set up dirs | ||
command: | | ||
cd .. && mv project frontend | ||
mkdir project | ||
- run: | ||
name: Create DKAN site with frontend; run tests | ||
name: Build Frontend into a full DKAN site | ||
command: | | ||
which ddev | ||
ddev --version | ||
ddev config --project-name test-$CIRCLE_WORKFLOW_JOB_ID --project-type drupal9 --docroot docroot --create-docroot | ||
ddev get getdkan/ddev-dkan | ||
ddev restart | ||
ddev status | ||
ddev dkan-init --force | ||
ddev dkan-site-install | ||
ddev dkan-sample-content | ||
ddev dkan-frontend-install | ||
rm -r docroot/frontend | ||
mv ../frontend docroot/frontend | ||
cd docroot/frontend && npm install | ||
cd ../../ | ||
ddev dkan-frontend-build | ||
- run: | ||
name: Run Cypress tests | ||
command: | | ||
dktl init --dkan=2.x-dev | ||
dktl make | ||
dktl install | ||
dktl install:sample | ||
mv ../frontend src | ||
dktl frontend:install | ||
dktl frontend:build | ||
dktl frontend:test | ||
cd docroot/frontend && npx cypress run --config baseUrl="http://test-$CIRCLE_WORKFLOW_JOB_ID.ddev.site" | ||
- store_artifacts: | ||
path: src/frontend/cypress/screenshots | ||
path: dkan/cypress/screenshots | ||
- store_artifacts: | ||
path: src/frontend/cypress/videos | ||
path: dkan/cypress/videos |
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 |
---|---|---|
@@ -1 +1 @@ | ||
REACT_APP_ROOT_URL = "http://dkan.localtest.me/api/1" | ||
VITE_REACT_APP_ROOT_URL = "/api/1" |
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 |
---|---|---|
@@ -1 +1 @@ | ||
REACT_APP_ROOT_URL = "/api/1" | ||
VITE_REACT_APP_ROOT_URL = "/api/1" |
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 |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
# production | ||
/build | ||
/dist | ||
|
||
# misc | ||
.DS_Store | ||
|
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,9 @@ | ||
const { defineConfig } = require("cypress"); | ||
|
||
module.exports = defineConfig({ | ||
e2e: { | ||
setupNodeEvents(on, config) { | ||
// implement node event listeners here | ||
}, | ||
}, | ||
}); |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,20 @@ | ||
// *********************************************************** | ||
// This example support/e2e.js is processed and | ||
// loaded automatically before your test files. | ||
// | ||
// This is a great place to put global configuration and | ||
// behavior that modifies Cypress. | ||
// | ||
// You can change the location of this file or turn off | ||
// automatically serving support files with the | ||
// 'supportFile' configuration option. | ||
// | ||
// You can read more here: | ||
// https://on.cypress.io/configuration | ||
// *********************************************************** | ||
|
||
// Import commands.js using ES2015 syntax: | ||
import './commands' | ||
|
||
// Alternatively you can use CommonJS syntax: | ||
// require('./commands') |
Oops, something went wrong.