Skip to content

Commit

Permalink
Add CI workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
jprinet committed Oct 31, 2023
1 parent ed6cf76 commit ff9946e
Show file tree
Hide file tree
Showing 4 changed files with 86 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on:
pull_request:
push:
branches:
- main
- 'releases/*'

jobs:
build-maven-build-scan-publish:
runs-on: ubuntu-latest
strategy:
matrix:
action: ["maven-build-scan-save", "maven-build-scan-publish"]
steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ${{ matrix.action }}/package-lock.json
- name: Install Dependencies
id: npm-ci
run: npm ci
working-directory: ./${{ matrix.action }}
- name: Check Format
id: npm-format-check
run: npm run format:check
working-directory: ./${{ matrix.action }}
- name: Lint
id: npm-lint
run: npm run lint
working-directory: ./${{ matrix.action }}
- name: Test
id: npm-ci-test
run: npm run test
43 changes: 43 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Lint Code Base

on:
pull_request:
branches:
- main
push:
branches-ignore:
- main

jobs:
lint:
name: Lint Code Base
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
statuses: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4
- name: Setup Node.js
id: setup-node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: ${{ matrix.action }}/package-lock.json
- name: Install Dependencies
id: install
run: npm ci
working-directory: ./maven-build-scan-publish
- name: Lint Code Base
id: super-linter
uses: super-linter/super-linter/slim@v5
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TYPESCRIPT_DEFAULT_STYLE: prettier
VALIDATE_JSCPD: false
1 change: 1 addition & 0 deletions maven-build-scan-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"scripts": {
"bundle": "npm run format:write && npm run lint && npm run package && npm run test",
"format:check": "prettier --check src/**.ts",
"format:write": "prettier --write src/**.ts",
"format:test": "prettier --write __tests__/**/**.ts",
"lint": "eslint src/**.ts",
Expand Down
1 change: 1 addition & 0 deletions maven-build-scan-save/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"scripts": {
"bundle": "npm run format:write && npm run lint && npm run package && npm run test",
"format:check": "prettier --check src/**.ts",
"format:write": "prettier --write src/**.ts",
"format:test": "prettier --write __tests__/**.ts",
"lint": "eslint src/**.ts",
Expand Down

0 comments on commit ff9946e

Please sign in to comment.