Refactored CI/CD
This commit is contained in:
21
.github/workflows/compress-json-schemas.yml
vendored
21
.github/workflows/compress-json-schemas.yml
vendored
@@ -1,32 +1,23 @@
|
|||||||
# This is a basic workflow to help you get started with Actions
|
# This is a basic workflow to help you get started with Actions
|
||||||
|
|
||||||
name: Compress Json Schemas
|
name: 🖥️ Compress Json Schemas
|
||||||
|
|
||||||
# Controls when the action will run.
|
|
||||||
on:
|
on:
|
||||||
# Triggers the workflow on push or pull request events but only for the main branch
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
# Allows you to run this workflow manually from the Actions tab
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: compress-schemas
|
group: compress-schemas
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
||||||
jobs:
|
jobs:
|
||||||
# This workflow contains a single job called "build"
|
|
||||||
build:
|
build:
|
||||||
# The type of runner that the job will run on
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: 🖥️ Compress Schemas
|
||||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
||||||
steps:
|
steps:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
- name: Checkout Repository
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: DaanV2/Json-Schema-Action-Compression@v2.1
|
- uses: DaanV2/Json-Schema-Action-Compression@v2.1
|
||||||
@@ -34,12 +25,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
specificationFile: "${{github.workspace}}/source/compress_specification.json"
|
specificationFile: "${{github.workspace}}/source/compress_specification.json"
|
||||||
|
|
||||||
- name: Commit changes
|
- name: ✏️ Commit changes
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
run: |
|
run: |
|
||||||
cd ${{github.workspace}}
|
cd ${{github.workspace}}
|
||||||
git config --global user.email "Bot@Blockception.com"
|
git config --global user.email "Blockception@github.com"
|
||||||
git config --global user.name "Blockception[bot]"
|
git config --global user.name "Orbi[bot]"
|
||||||
git add .
|
git add .
|
||||||
git commit -m "auto: Generated Json Schemas"
|
git commit -m "auto: Generated Json Schemas"
|
||||||
git push
|
git push
|
||||||
|
|||||||
10
.github/workflows/dependabot.yml
vendored
10
.github/workflows/dependabot.yml
vendored
@@ -5,16 +5,16 @@ permissions:
|
|||||||
pull-requests: write
|
pull-requests: write
|
||||||
contents: write
|
contents: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: dependabot-check
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
dependabot:
|
dependabot:
|
||||||
|
name: Dependabot auto merge
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.actor == 'dependabot[bot]' }}
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
||||||
steps:
|
steps:
|
||||||
- name: Dependabot metadata
|
|
||||||
id: metadata
|
|
||||||
uses: dependabot/fetch-metadata@v1.1.1
|
|
||||||
with:
|
|
||||||
github-token: "${{ secrets.GITHUB_TOKEN }}"
|
|
||||||
- name: Enable auto-merge for Dependabot PRs
|
- name: Enable auto-merge for Dependabot PRs
|
||||||
run: gh pr merge --auto --merge "$PR_URL"
|
run: gh pr merge --auto --merge "$PR_URL"
|
||||||
env:
|
env:
|
||||||
|
|||||||
2
.github/workflows/format-json-files.yml
vendored
2
.github/workflows/format-json-files.yml
vendored
@@ -45,6 +45,6 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
git add .
|
git add .
|
||||||
git config --global user.email "Bot@Blockception.com"
|
git config --global user.email "Bot@Blockception.com"
|
||||||
git config --global user.name "Blockception[bot]"
|
git config --global user.name "Orbi[bot]"
|
||||||
git commit -m "auto: Formatted json files"
|
git commit -m "auto: Formatted json files"
|
||||||
git push
|
git push
|
||||||
|
|||||||
21
.github/workflows/pull-request.yml
vendored
21
.github/workflows/pull-request.yml
vendored
@@ -1,8 +1,7 @@
|
|||||||
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
||||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
|
||||||
|
|
||||||
name: Pull Request
|
name: PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
@@ -13,7 +12,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build Check
|
name: 🛠️ Build Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
@@ -26,14 +25,14 @@ jobs:
|
|||||||
cache-dependency-path: package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
|
|
||||||
- name: Install
|
- name: Setup Project
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build
|
- name: 🛠️ Build Check
|
||||||
run: npm run compile
|
run: npm run compile
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
name: Lint Check
|
name: 🔍 Lint Check
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
@@ -46,14 +45,14 @@ jobs:
|
|||||||
cache-dependency-path: package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
|
|
||||||
- name: Install
|
- name: Setup Project
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Build
|
- name: 🔍 Linting check
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit Test ${{ matrix.os }}
|
name: 📋 Unit Test ${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
needs: [build]
|
needs: [build]
|
||||||
strategy:
|
strategy:
|
||||||
@@ -72,8 +71,8 @@ jobs:
|
|||||||
cache-dependency-path: package-lock.json
|
cache-dependency-path: package-lock.json
|
||||||
node-version-file: .nvmrc
|
node-version-file: .nvmrc
|
||||||
|
|
||||||
- name: Install
|
- name: Setup Project
|
||||||
run: npm ci
|
run: npm ci
|
||||||
|
|
||||||
- name: Test
|
- name: 📋 Test
|
||||||
run: npm test
|
run: npm test
|
||||||
|
|||||||
Reference in New Issue
Block a user