Skip to content

upgrading CI process #13

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

Merged
merged 9 commits into from
Mar 12, 2021
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
101 changes: 101 additions & 0 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: Tests and publishing
env:
FORCE_COLOR: 1
on:
push:
branches:
- master
- main
- develop
pull_request:
branches:
- master
- main
jobs:
test_linux:
name: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
# os: [ubuntu-18.04, ubuntu-20.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: microsoft/playwright-github-action@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
test_win:
name: "Windows"
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14
- uses: microsoft/playwright-github-action@v1
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
tag:
name: "Publishing release"
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
needs:
- test_linux
- test_win
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- run: npm install
- name: Read version from package.json
uses: culshaw/read-package-node-version-actions@v1
id: package-node-version
- name: Changelog
uses: scottbrenner/generate-changelog-action@master
id: Changelog
- name: Github Release
id: create_release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ steps.package-node-version.outputs.version }}
release_name: v${{ steps.package-node-version.outputs.version }}
body: |
${{ steps.Changelog.outputs.changelog }}
draft: false
prerelease: false
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44 changes: 0 additions & 44 deletions .github/workflows/tests.yml

This file was deleted.

10 changes: 0 additions & 10 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,5 @@
coverage/
test/
demo/
gen-tsd.json
CONTRIBUTING.md
.travis.yml
index.html
polymer.json
karma.*
husky.*
commitlint.*
.*
*.config.*
prettier.config.js
dist/
1,170 changes: 0 additions & 1,170 deletions CHANGELOG.md

This file was deleted.

74 changes: 0 additions & 74 deletions CONTRIBUTING.md

This file was deleted.

46 changes: 40 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,52 @@
[![Published on NPM](https://img.shields.io/npm/v/@api-components/api-endpoint-documentation.svg)](https://www.npmjs.com/package/@api-components/api-endpoint-documentation)

[![Build Status](https://travis-ci.com/advanced-rest-client/api-endpoint-documentation.svg)](https://travis-ci.org/advanced-rest-client/api-endpoint-documentation)
# api-endpoint-documentation

[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/advanced-rest-client/api-endpoint-documentation)
A component to generate documentation for an API resource from AMF model.

## <api-endpoint-documentation>
[![Tests and publishing](https://github.com/advanced-rest-client/api-endpoint-documentation/actions/workflows/deployment.yml/badge.svg)](https://github.com/advanced-rest-client/api-endpoint-documentation/actions/workflows/deployment.yml)

A component to generate documentation for an API resource from AMF model.
[![Published on NPM](https://img.shields.io/npm/v/@api-components/api-endpoint-documentation.svg)](https://www.npmjs.com/package/@api-components/api-endpoint-documentation)

## Version compatibility

This version only works with AMF model version 2 (AMF parser >= 4.0.0).
For compatibility with previous model version use `3.x.x` version of the component.

## Styling

`<api-endpoint-documentation>` provides the following custom properties and mixins for styling:

Custom property | Description | Default
----------------|-------------|----------
`--arc-font-headline-color` | Color of the method title | ``
`--arc-font-headline-font-size` | Font size of the method title | ``
`--arc-font-headline-letter-spacing` | Letter spacing of the method title | ``
`--arc-font-headline-line-height` | Line height of the method title | ``
`--arc-font-headline-narrow-font-size` | Font size of the method title in mobile-friendly view | ``
`--arc-font-title-color` | Color of the overview section title | ``
`--arc-font-title-font-size` | Font size of the overview section title | ``
`--arc-font-title-line-height` | Line height of the overview section title | ``
`--arc-font-title-narrow-font-size` | Font size of the overview section title in mobile-friendly view | ``
`--arc-font-subhead-color` | Color of the collapsible section title | ``
`--arc-font-subhead-font-size` | Font size of the collapsible section title | ``
`--arc-font-subhead-line-height` | Line height of the collapsible section title | ``
`--arc-font-subhead-narrow-font-size` | Font size of the collapsible section title in mobile-friendly view | ``
`--api-endpoint-documentation-description-color` | | `rgba(0, 0, 0, 0.74)`
`--api-endpoint-documentation-bottom-navigation-color` | | `#000`
`--api-endpoint-documentation-method-doc-border-top-color` | | `#E5E5E5`
`--api-endpoint-documentation-method-doc-border-top-style` | | `dashed`
`--api-endpoint-documentation-tryit-width` | | `40%`
`--api-endpoint-documentation-tryit-max-width` | | ``
`--api-endpoint-documentation-tryit-background-color` | | `#ECEFF1`
`--api-endpoint-documentation-tryit-panels-background-color` | | `#fff`
`--api-endpoint-documentation-tryit-panels-border-radius` | | `3px`
`--api-endpoint-documentation-tryit-panels-border-color` | | `#EEEEEE`
`--api-endpoint-documentation-tryit-panels-border-style` | | `solid`
`--api-endpoint-documentation-tryit-title-border-bottom-color` | | `#bac6cb`
`--api-endpoint-documentation-tryit-title-border-bottom-style` | | `solid`
`--no-info-message-font-style` | | `italic`
`--no-info-message-font-size` | | `16px`
`--no-info-message-color` | | `rgba(0, 0, 0, 0.74)`

## Usage

### Installation
Expand Down
Loading