Skip to content

Commit

Permalink
Chore/add chagesets test changeset (#1199)
Browse files Browse the repository at this point in the history
* chore: tests creating changesets

* chore: customize ...

* chore: add changeset

* chore: use fixed instead on linked

* chore: modify action
  • Loading branch information
tatomyr committed Aug 4, 2023
1 parent 8d492d3 commit 87fae4a
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 76 deletions.
6 changes: 3 additions & 3 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [["@redocly/cli", "@redocly/openapi-core"]],
"access": "restricted",
"fixed": [["@redocly/cli", "@redocly/openapi-core"]],
"linked": [],
"access": "public",
"baseBranch": "chore/add-chagesets",
"updateInternalDependencies": "patch",
"ignore": []
Expand Down
5 changes: 5 additions & 0 deletions .changeset/honest-pumas-matter.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@redocly/cli': minor
---

chore: customize action
14 changes: 10 additions & 4 deletions .github/workflows/test-changeset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,26 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 16.x
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20
cache: npm

- name: Install Dependencies
run: npm ci

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
uses: RomanHotsiy/changesets-action@v1
with:
# This expects you to have a script called release which does a build for your packages and calls changeset publish
publish: echo "TESTING PUSHING TO NPM!!!"
publish: echo "TESTING PUSHING TO NPM!!!" # release
commit: "chore: 🔖 release new versions"
title: "chore: 🔖 release new versions"
version: |
npx changeset version
npm i
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
138 changes: 69 additions & 69 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,78 +8,78 @@ on:
- main

jobs:
build-and-unit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Typecheck
run: npm run typecheck
- name: Unit Tests
run: npm run jest -- --silent --ci --testLocationInResults --bail --coverage
- name: E2E Tests
run: npm run e2e
env:
CI: true
# build-and-unit:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# - name: Install dependencies
# run: npm ci
# env:
# CI: true
# - name: Typecheck
# run: npm run typecheck
# - name: Unit Tests
# run: npm run jest -- --silent --ci --testLocationInResults --bail --coverage
# - name: E2E Tests
# run: npm run e2e
# env:
# CI: true

# FIXME: fix this so the `cli` package includes the corresponding `core`
cli-package-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- name: Prepare CLI and Core packages
run: npm run pack:prepare
- name: Install CLI Package
run: npm install -g redocly-cli.tgz
- name: Redocly version
run: redocly --version
- name: Definition test
run: redocly lint packages/core/src/benchmark/benches/rebilly.yaml --format=stylish
# # FIXME: fix this so the `cli` package includes the corresponding `core`
# cli-package-test:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# - name: Install dependencies
# run: npm ci
# env:
# CI: true
# - name: Prepare CLI and Core packages
# run: npm run pack:prepare
# - name: Install CLI Package
# run: npm install -g redocly-cli.tgz
# - name: Redocly version
# run: redocly --version
# - name: Definition test
# run: redocly lint packages/core/src/benchmark/benches/rebilly.yaml --format=stylish

coverage-report:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Coverage Report
uses: artiomtr/[email protected]
continue-on-error: true
with:
skip-step: none
annotations: none
test-script: npm run jest
# coverage-report:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# - name: Coverage Report
# uses: artiomtr/[email protected]
# continue-on-error: true
# with:
# skip-step: none
# annotations: none
# test-script: npm run jest

prettier-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
run: npm ci
env:
CI: true
- run: npm run prettier:check
# prettier-check:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 18
# cache: 'npm'
# - name: Install dependencies
# run: npm ci
# env:
# CI: true
# - run: npm run prettier:check

eslint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 87fae4a

Please sign in to comment.