diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8b4ebc40..7f3d70e2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,10 +1,10 @@ name: Build conda-store-ui on: pull_request: - branches: - - '*' + branches: + - "*" push: - branches: + branches: - main workflow_call: @@ -16,15 +16,15 @@ jobs: steps: - name: "Checkout repository ๐Ÿ›Ž" uses: actions/checkout@v4 - + - name: "Set up Node.js ๐Ÿงถ" uses: actions/setup-node@v3 with: - node-version: '16.x' + node-version: 18 - name: "Install dependencies ๐Ÿ“ฆ" run: yarn - + - name: "Lint code ๐Ÿ”" run: yarn eslint:check @@ -33,7 +33,7 @@ jobs: - name: "Build application artifacts ๐Ÿ—" run: yarn run webpack bundle - + - name: "Upload artifacts ๐Ÿ“ค" uses: actions/upload-artifact@v3 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a0252a39..6dc86747 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: "Set up Node.js ๐Ÿงถ" uses: actions/setup-node@v3 with: - node-version: "16.x" + node-version: 18 registry-url: "https://registry.npmjs.org" - name: "Install dependencies ๐Ÿ“ฆ" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 30b6c50e..bb639657 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,11 +9,11 @@ env: REACT_APP_API_URL: http://localhost:8080/conda-store/ REACT_APP_AUTH_METHOD: cookie REACT_APP_LOGIN_PAGE_URL: http://localhost:8080/conda-store/login?next= - REACT_APP_AUTH_TOKEN: + REACT_APP_AUTH_TOKEN: REACT_APP_STYLE_TYPE: green-accent REACT_APP_CONTEXT: webapp REACT_APP_SHOW_AUTH_BUTTON: true - REACT_APP_LOGOUT_PAGE_URL: http://localhost:8080/conda-store/logout?next=/ + REACT_APP_LOGOUT_PAGE_URL: http://localhost:8080/conda-store/logout?next=/ YARN_ENABLE_IMMUTABLE_INSTALLS: false on: @@ -24,7 +24,7 @@ on: jobs: test-conda-store-ui: - name: 'unit-test conda-store-ui' + name: "unit-test conda-store-ui" strategy: matrix: # cannot run on windows due to needing fake-chroot for conda-docker @@ -35,31 +35,30 @@ jobs: run: shell: bash -el {0} steps: - - name: 'Checkout Repository' - uses: actions/checkout@master + - name: "Checkout repository ๐Ÿ›Ž" + uses: actions/checkout@v4 - - name: Set up Python + - name: "Set up Python" uses: conda-incubator/setup-miniconda@v2 - env: + env: CONDA_SOLVER: libmamba with: - activate-environment: test-env + activate-environment: cs-ui-dev-env environment-file: environment_dev.yml auto-activate-base: false - - name: Install Dependencies + - name: "Install Dependencies" run: | sudo apt install wait-for-it -y - - name: Deploy conda-store-server docker container + - name: "Deploy conda-store-server docker container" run: | docker-compose -f docker-compose-dev.yml up -d --build docker ps wait-for-it localhost:8080 # conda-store-server - - - name: Deploy webpack dev server + - name: "Deploy webpack dev server" shell: bash -el {0} run: | conda list @@ -69,8 +68,8 @@ jobs: yarn run start & pytest --video on --output test-results --screenshots true test/playwright/test_ux.py - - name: Upload artifacts - uses: actions/upload-artifact@v2 + - name: "Upload artifacts" + uses: actions/upload-artifact@v3 if: ${{ always() }} with: name: playwright-tests diff --git a/Dockerfile b/Dockerfile index e2787a6b..2b8c4ee6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16.16-alpine3.18 +FROM node:18.18-alpine3.18 WORKDIR /usr/src/app diff --git a/README.md b/README.md index 250f2650..a0d42076 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,11 @@ --- -| Information | Links | -| :---------- | :-----| -| Project | [![License](https://img.shields.io/badge/License-BSD%203--Clause-gray.svg?&colorB=298642&style=flat.svg)](https://opensource.org/licenses/BSD-3-Clause) [![conda-store documentation](https://img.shields.io/badge/conda--store-documentation%20๐Ÿ“–-gray.svg?&colorB=298642&style=flat.svg)][conda-store-docs] [![conda-store-ui documentation](https://img.shields.io/badge/conda--store--UI-documentation%20๐Ÿ“–-gray.svg?&colorB=298642&style=flat.svg)][conda-store-ui-docs] | -| Wofklows | ![GitHub Workflow Status - Build](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/build.yml?label=Build&logo=GitHub) ![GitHub Workflow Status (with event) - Release](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/release.yml?event=push&label=Release&logo=GitHub) ![GitHub Workflow Status - GitHub pages](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/pages.yml?label=Docs&logo=GitHub) | -| Releases | ![GitHub release (the latest by date)](https://img.shields.io/github/v/release/conda-incubator/conda-store-ui?logo=Github) ![npm release version](https://img.shields.io/npm/v/@conda-store/conda-store-ui?label=release&logo=npm) | +| Information | Links | +| :---------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Project | [![License](https://img.shields.io/badge/License-BSD%203--Clause-gray.svg?&colorB=298642&style=flat.svg)](https://opensource.org/licenses/BSD-3-Clause) [![conda-store documentation](https://img.shields.io/badge/conda--store-documentation%20๐Ÿ“–-gray.svg?&colorB=298642&style=flat.svg)][conda-store-docs] [![conda-store-ui documentation](https://img.shields.io/badge/conda--store--UI-documentation%20๐Ÿ“–-gray.svg?&colorB=298642&style=flat.svg)][conda-store-ui-docs] | +| Wofklows | ![GitHub Workflow Status - Build](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/build.yml?label=Build&logo=GitHub) ![GitHub Workflow Status (with event) - Release](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/release.yml?event=push&label=Release&logo=GitHub) ![GitHub Workflow Status - GitHub pages](https://img.shields.io/github/actions/workflow/status/conda-incubator/conda-store-ui/pages.yml?label=Docs&logo=GitHub) | +| Releases | ![GitHub release (the latest by date)](https://img.shields.io/github/v/release/conda-incubator/conda-store-ui?logo=Github) ![npm release version](https://img.shields.io/npm/v/@conda-store/conda-store-ui?label=release&logo=npm) | --- @@ -44,15 +44,17 @@ To get started: docker-compose -f docker-compose-dev.yml up --build ``` -2. Install yarn and NodeJS: +2. Install yarn and NodeJS with conda: - > **Note** + > [!NOTE] > Skip this if you are planning to use a local installation of yarn and NodeJS ```bash - conda create --name conda-store-ui - conda activate conda-store-ui - conda install -c conda-forge yarn nodejs==16.14.2 + conda env create -f environment_dev.yml + + # activate the newly created environment + conda activate cs-ui-dev-env + ``` 3. Finally, start the conda-store-ui application: @@ -65,18 +67,23 @@ To get started: yarn run start ``` -When compiling the application for development you will need to set a number of environment variables. Refer to the [Configuration documentation](https://conda-incubator.github.io/conda-store-ui/?path=/docs/docs-configuration--page) for more information. + once completed, you should be able to access the application at [http://localhost:8000/](http://localhost:8000/) + +> [!IMPORTANT] +> When compiling the application for development you will need to set several environment variables. +> Refer to the [Configuration documentation](https://conda-incubator.github.io/conda-store-ui/?path=/docs/docs-configuration--page) for more information. ### Making a release To create a new version of this package, follow these steps: + 1. Bump the version number in `package.json` (we use CalVer: `YYYY.MM.releaseNumber` starting with `releaseNumber=1`) 2. [Start a new GitHub release](https://github.com/conda-incubator/conda-store-ui/releases/new) - - Call the release the current version, e.g. `2023.9.1` - - In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2023.9.1`) and click "Create new tag" - - Add the release notes in the text field [^github-activity] + - Call the release the current version, e.g. `2023.9.1` + - In the **`Choose a Tag:`** dropdown, type in the release name (e.g., `2023.9.1`) and click "Create new tag" + - Add the release notes in the text field [^github-activity] 3. Confirm that the release completed successfully by checking the [GitHub Actions page](https://github.com/conda-incubator/conda-store-ui/actions). Once completed, a new release will be available at [npm - @conda-store/conda-store-ui](https://libraries.io/npm/@conda-store%2Fconda-store-ui) [^github-activity]: If you wish, use [`github-activity` to generate a Changelog](https://github.com/choldgraf/github-activity), e.g. `github-activity conda-incubator/conda-store-ui --since 2023.9.1 --until 2023.10.1 --auth ` @@ -94,4 +101,4 @@ conda-store-ui is developed under the [BSD-3 LICENSE](./LICENSE). [conda-store-docs]: https://conda.store/en/latest/ [conda-store-ui-docs]: https://conda-incubator.github.io/conda-store-ui/?path=/story/welcome--page [conda-store-repo]: https://github.com/conda-incubator/conda-store -[jupyterlab-conda-store-repo]: https://github.com/conda-incubator/jupyterlab-conda-store \ No newline at end of file +[jupyterlab-conda-store-repo]: https://github.com/conda-incubator/jupyterlab-conda-store diff --git a/environment_dev.yml b/environment_dev.yml index bdbcdadc..1b98313c 100755 --- a/environment_dev.yml +++ b/environment_dev.yml @@ -1,14 +1,15 @@ -# Environment for developing the conda-store-ui and for running +# Environment for developing the conda-store-ui and for running # playwright tests -name: test-env +name: cs-ui-dev-env channels: -- conda-forge + - conda-forge dependencies: -- python=3.10 -- yarn -- nodejs==16.14.2 -- pytest -- pip: - - playwright - - pytest-playwright \ No newline at end of file + - python=3.10 + - yarn + - nodejs>=18.0 + - pytest + - pip + - pip: + - playwright + - pytest-playwright diff --git a/package.json b/package.json index 08a97765..7d62f323 100644 --- a/package.json +++ b/package.json @@ -134,5 +134,8 @@ "webpack-cli": "^4.9.2", "webpack-dev-server": "^4.8.1", "whatwg-fetch": "^3.6.2" + }, + "engines": { + "node": ">=18.0.0" } } \ No newline at end of file