Skip to content

Commit ea3150b

Browse files
authored
Merge pull request #13 from advanced-rest-client/develop
upgrading CI process
2 parents 78186ab + 76314f4 commit ea3150b

File tree

11 files changed

+1874
-3037
lines changed

11 files changed

+1874
-3037
lines changed

.github/workflows/deployment.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Tests and publishing
2+
env:
3+
FORCE_COLOR: 1
4+
on:
5+
push:
6+
branches:
7+
- master
8+
- main
9+
- develop
10+
pull_request:
11+
branches:
12+
- master
13+
- main
14+
jobs:
15+
test_linux:
16+
name: ${{ matrix.os }}
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
os: [ubuntu-20.04]
21+
# os: [ubuntu-18.04, ubuntu-20.04]
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v1
26+
with:
27+
node-version: 14
28+
- uses: microsoft/playwright-github-action@v1
29+
- uses: actions/cache@v1
30+
with:
31+
path: ~/.npm
32+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
33+
restore-keys: |
34+
${{ runner.os }}-node-
35+
- name: Install dependencies
36+
run: npm ci
37+
- name: Run tests
38+
run: npm test
39+
test_win:
40+
name: "Windows"
41+
runs-on: windows-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions/setup-node@v1
45+
with:
46+
node-version: 14
47+
- uses: microsoft/playwright-github-action@v1
48+
- uses: actions/cache@v1
49+
with:
50+
path: ~/.npm
51+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
52+
restore-keys: |
53+
${{ runner.os }}-node-
54+
- name: Install dependencies
55+
run: npm ci
56+
- name: Run tests
57+
run: npm test
58+
tag:
59+
name: "Publishing release"
60+
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master'
61+
needs:
62+
- test_linux
63+
- test_win
64+
runs-on: ubuntu-latest
65+
steps:
66+
- name: Checkout code
67+
uses: actions/checkout@v2
68+
with:
69+
fetch-depth: 0
70+
- uses: actions/setup-node@v2
71+
with:
72+
node-version: '14.x'
73+
registry-url: 'https://registry.npmjs.org'
74+
- uses: actions/cache@v1
75+
with:
76+
path: ~/.npm
77+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
78+
restore-keys: |
79+
${{ runner.os }}-node-
80+
- run: npm install
81+
- name: Read version from package.json
82+
uses: culshaw/read-package-node-version-actions@v1
83+
id: package-node-version
84+
- name: Changelog
85+
uses: scottbrenner/generate-changelog-action@master
86+
id: Changelog
87+
- name: Github Release
88+
id: create_release
89+
uses: actions/create-release@latest
90+
env:
91+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92+
with:
93+
tag_name: v${{ steps.package-node-version.outputs.version }}
94+
release_name: v${{ steps.package-node-version.outputs.version }}
95+
body: |
96+
${{ steps.Changelog.outputs.changelog }}
97+
draft: false
98+
prerelease: false
99+
- run: npm publish --access public
100+
env:
101+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.github/workflows/tests.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.npmignore

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
coverage/
22
test/
33
demo/
4-
gen-tsd.json
5-
CONTRIBUTING.md
6-
.travis.yml
7-
index.html
8-
polymer.json
9-
karma.*
10-
husky.*
11-
commitlint.*
124
.*
135
*.config.*
14-
prettier.config.js
15-
dist/

CHANGELOG.md

Lines changed: 0 additions & 1170 deletions
This file was deleted.

CONTRIBUTING.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

README.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,52 @@
1-
[![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)
2-
3-
[![Build Status](https://travis-ci.com/advanced-rest-client/api-endpoint-documentation.svg)](https://travis-ci.org/advanced-rest-client/api-endpoint-documentation)
1+
# api-endpoint-documentation
42

5-
[![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)
3+
A component to generate documentation for an API resource from AMF model.
64

7-
## <api-endpoint-documentation>
5+
[![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)
86

9-
A component to generate documentation for an API resource from AMF model.
7+
[![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)
108

119
## Version compatibility
1210

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

14+
## Styling
15+
16+
`<api-endpoint-documentation>` provides the following custom properties and mixins for styling:
17+
18+
Custom property | Description | Default
19+
----------------|-------------|----------
20+
`--arc-font-headline-color` | Color of the method title | ``
21+
`--arc-font-headline-font-size` | Font size of the method title | ``
22+
`--arc-font-headline-letter-spacing` | Letter spacing of the method title | ``
23+
`--arc-font-headline-line-height` | Line height of the method title | ``
24+
`--arc-font-headline-narrow-font-size` | Font size of the method title in mobile-friendly view | ``
25+
`--arc-font-title-color` | Color of the overview section title | ``
26+
`--arc-font-title-font-size` | Font size of the overview section title | ``
27+
`--arc-font-title-line-height` | Line height of the overview section title | ``
28+
`--arc-font-title-narrow-font-size` | Font size of the overview section title in mobile-friendly view | ``
29+
`--arc-font-subhead-color` | Color of the collapsible section title | ``
30+
`--arc-font-subhead-font-size` | Font size of the collapsible section title | ``
31+
`--arc-font-subhead-line-height` | Line height of the collapsible section title | ``
32+
`--arc-font-subhead-narrow-font-size` | Font size of the collapsible section title in mobile-friendly view | ``
33+
`--api-endpoint-documentation-description-color` | | `rgba(0, 0, 0, 0.74)`
34+
`--api-endpoint-documentation-bottom-navigation-color` | | `#000`
35+
`--api-endpoint-documentation-method-doc-border-top-color` | | `#E5E5E5`
36+
`--api-endpoint-documentation-method-doc-border-top-style` | | `dashed`
37+
`--api-endpoint-documentation-tryit-width` | | `40%`
38+
`--api-endpoint-documentation-tryit-max-width` | | ``
39+
`--api-endpoint-documentation-tryit-background-color` | | `#ECEFF1`
40+
`--api-endpoint-documentation-tryit-panels-background-color` | | `#fff`
41+
`--api-endpoint-documentation-tryit-panels-border-radius` | | `3px`
42+
`--api-endpoint-documentation-tryit-panels-border-color` | | `#EEEEEE`
43+
`--api-endpoint-documentation-tryit-panels-border-style` | | `solid`
44+
`--api-endpoint-documentation-tryit-title-border-bottom-color` | | `#bac6cb`
45+
`--api-endpoint-documentation-tryit-title-border-bottom-style` | | `solid`
46+
`--no-info-message-font-style` | | `italic`
47+
`--no-info-message-font-size` | | `16px`
48+
`--no-info-message-color` | | `rgba(0, 0, 0, 0.74)`
49+
1650
## Usage
1751

1852
### Installation

0 commit comments

Comments
 (0)