Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: setup semantic-release and fix cypress tests #1024

Merged
merged 2 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Publish docs

on:
workflow_call:
workflow_dispatch:
push:
branches:
- main

jobs:
build-docs:
Expand Down
28 changes: 0 additions & 28 deletions .github/workflows/publish-on-release.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .github/workflows/release-drafter.yml

This file was deleted.

9 changes: 6 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16
node-version: "lts/*"

- name: Install dependencies
run: yarn install
Expand All @@ -37,12 +37,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cypress-io/github-action@v5
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- uses: cypress-io/github-action@v6
with:
start: yarn docs
wait-on: "http://localhost:9009"
browser: chrome
headless: true
env: port=9009
- uses: actions/upload-artifact@v3
if: failure()
Expand Down
12 changes: 12 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"branches": [
"main"
],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github"
]
}
65 changes: 0 additions & 65 deletions PUBLISH-NPM-PACKAGE.md

This file was deleted.

7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# React components for Vanilla Framework
![CI](https://github.com/canonical/react-components/workflows/CI/badge.svg?branch=main) ![Cypress chrome headless](https://github.com/canonical/react-components/workflows/Cypress%20chrome%20headless/badge.svg)

This is a collection of components designed to be the way to consume [Vanilla Framework](http://vanillaframework.io) when using React.

## How to use the components
**[Storybook](https://canonical.github.io/react-components/)** contains component docs with usage instructions.

See the [component docs](https://canonical.github.io/react-components/) for usage instructions.

![CI](https://github.com/canonical/react-components/workflows/CI/badge.svg?branch=main)
![Cypress chrome headless](https://github.com/canonical/react-components/workflows/Cypress%20chrome%20headless/badge.svg)

## Requirements

Expand Down
1 change: 1 addition & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = { extends: ["@commitlint/config-conventional"] };
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"@babel/preset-typescript": "7.23.3",
"@percy/cli": "1.27.6",
"@percy/storybook": "4.3.7",
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"@storybook/addon-a11y": "7.6.7",
"@storybook/addon-essentials": "7.6.7",
"@storybook/addon-interactions": "7.6.7",
Expand Down Expand Up @@ -71,6 +73,7 @@
"react-dom": "18.2.0",
"sass": "1.69.7",
"sass-loader": "10.5.1",
"semantic-release": "23.0.0",
"storybook": "7.6.7",
"style-loader": "3.3.3",
"stylelint": "15.11.0",
Expand Down Expand Up @@ -127,15 +130,16 @@
"lint-package-json": "npmPkgJsonLint .",
"lint": "yarn lint-package-json && yarn lint-js && yarn lint-style",
"percy": "yarn build-docs && percy storybook ./docs",
"prepublishOnly": "yarn clean && yarn install && yarn build",
"serve": "yarn docs",
"start": "yarn docs",
"test": "jest",
"test-cypress": "concurrently 'yarn run docs' 'yarn run cypress:test' -k -s first",
"unlink-packages": "yarn unlink && cd node_modules/react && yarn unlink && cd ../react-dom && yarn unlink",
"cypress:test": "wait-on http://localhost:${PORT:-9009} && cypress run --env port=${PORT:-9009}",
"cypress:run": "cypress run --env port=${PORT:-9009}",
"cypress:open": "cypress open --env port=${PORT:-9009}"
"cypress:open": "cypress open --env port=${PORT:-9009}",
"semantic-release": "semantic-release",
"semantic-release-dry-run": "semantic-release --dry-run --no-ci"
},
"eslintConfig": {
"extends": "react-app"
Expand Down
Loading
Loading