Skip to content

Commit

Permalink
ci(actions): replace old ci setup with new github actions workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Jul 30, 2020
1 parent 5c53c92 commit fd48174
Show file tree
Hide file tree
Showing 12 changed files with 313 additions and 128 deletions.
3 changes: 0 additions & 3 deletions .eslintrc

This file was deleted.

14 changes: 14 additions & 0 deletions .github/dependabot.yml
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: "github-actions"
open-pull-requests-limit: 10
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "npm"
open-pull-requests-limit: 10
directory: "/"
schedule:
interval: "daily"

154 changes: 154 additions & 0 deletions .github/linters/.markdown-lint.yml
@@ -0,0 +1,154 @@
# Heading levels should only increment by one level at a time
MD001: false

# Heading style
MD003:
style: atx

# Unordered list style
MD004:
style: dash

# Inconsistent indentation for list items at the same level
MD005: true

# Unordered list indentation
MD007:
indent: 2
start_indented: false

# Trailing spaces
MD009:
br_spaces: 2
list_item_empty_lines: false
strict: false

# Hard tabs
MD010:
code_blocks: false

# Reversed link syntax
MD011: true

# Multiple consecutive blank lines
MD012:
maximum: 1

# Line length
MD013:
line_length: 180
strict: true
stern: true

# Dollar signs used before commands without showing output
MD014: false

# No space after hash on atx style heading
MD018: true

# Multiple spaces after hash on atx style heading
MD019: true

# No space inside hashes on closed atx style heading
MD020: true

# Multiple spaces inside hashes on closed atx style heading
MD021: true

# Headings should be surrounded by blank lines
MD022:
lines_above: 1
lines_below: 1


# Headings must start at the beginning of the line
MD023: true

# Multiple headings with the same content
MD024:
allow_different_nesting: true

# Multiple top level headings in the same document
MD025: true

# Trailing punctuation in heading
MD026:
punctuation: ".,;:!?。,;:!?"

# Multiple spaces after blockquote symbol
MD027: true

# Blank line inside blockquote
MD028: true

# Ordered list item prefix
MD029:
style: one_or_ordered

# Spaces after list markers
MD030:
ul_single: 1
ol_single: 1
ul_multi: 1
ol_multi: 1

# Fenced code blocks should be surrounded by blank lines
MD031:
list_items: true

# Lists should be surrounded by blank lines
MD032: true

# inline HTML
MD033:
allowed_elements: []

# Bare URL used
MD034: true

# Horizontal rule style
MD035:
style: "---"


# Emphasis used instead of a heading
MD036:
punctuation: ".,;:!?。,;:!?"

# Spaces inside emphasis markers
MD037: true

# Spaces inside code span elements
MD038: true

# Spaces inside link text
MD039: true

# Fenced code blocks should have a language specified
MD040: true

# First line in file should be a top level heading
MD041: true

# No empty links
MD042: true

# Required heading structure
MD043: false

# Proper names should have the correct capitalization
MD044: false

# Images should have alternate text (alt text)
MD045: false

# Code block style
MD046:
style: fenced

# Files should end with a single newline character
MD047: true

# Code fence style
MD048:
style: backtick
16 changes: 0 additions & 16 deletions .github/settings.yml

This file was deleted.

59 changes: 59 additions & 0 deletions .github/workflows/release.yml
@@ -0,0 +1,59 @@
name: release

on:
push:
branches:
- master

jobs:
dependencies:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.1

# run checks
- run: npm audit --audit-level=moderate
- run: npx updated

test:
needs: dependencies

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 13, 14]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: ~/.npm
key: client-${{ hashFiles('**/package-lock.json') }}

- uses: actions/setup-node@v2.1.1
with:
node-version: ${{ matrix.node-version }}

# run test
- run: npm ci
- run: npm run test

release:
needs: test

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.1

# release
- run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14 changes: 14 additions & 0 deletions .github/workflows/super-linter.yml
@@ -0,0 +1,14 @@
name: super-linter

on:
push:
branches-ignore:
- master

jobs:
super-linter:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: docker://github/super-linter:v3
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,44 @@
name: test

on:
push:
branches-ignore:
- master

jobs:
dependencies:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2.1.1

# run checks
- run: npm audit --audit-level=moderate
- run: npx updated

test:
needs: dependencies

strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node-version: [10, 12, 13, 14]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2

- uses: actions/cache@v2
with:
path: ~/.npm
key: client-${{ hashFiles('**/package-lock.json') }}

- uses: actions/setup-node@v2.1.1
with:
node-version: ${{ matrix.node-version }}

# run test
- run: npm ci
- run: npm run test
18 changes: 18 additions & 0 deletions .releaserc copy
@@ -0,0 +1,18 @@
{
"plugins": [
["@semantic-release/commit-analyzer", {
"releaseRules": [
{"breaking": true, "release": "major"},
{"revert": true, "release": "patch"},
{"type": "build", "release": "patch"},
{"type": "feat", "release": "minor"},
{"type": "fix", "release": "patch"},
{"type": "perf", "release": "patch"},
{"type": "refactor", "release": "patch"}
]
}],
"@semantic-release/release-notes-generator",
"@semantic-release/github",
"@semantic-release/npm"
]
}
5 changes: 0 additions & 5 deletions .remarkrc

This file was deleted.

0 comments on commit fd48174

Please sign in to comment.