Skip to content

Commit

Permalink
Sys 183 add GitHub ci (#14)
Browse files Browse the repository at this point in the history
* fixing issue comment Pr review stuff

* add codeowners, sync ci.yml, fix scripts

* cleanup gitlab.ci

* fixed quotes
  • Loading branch information
TieDyedSheep authored Aug 9, 2024
1 parent 3da9a31 commit b21840f
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 46 deletions.
27 changes: 20 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,16 @@ on:
branches:
- dev
- main
issue_comment:
inputs:
workflowBranch:
description: 'Branch of the reusable workflow. Defaults to main, select dev for testing only.'
required: true
default: 'main'
type: choice
options:
- dev
- main
workflow_dispatch:
inputs:
workflowBranch:
Expand All @@ -22,11 +32,6 @@ on:
options:
- dev
- main

permissions:
issues: write
pull-requests: write

jobs:
echo-inputs:
name: Repo Workflow Debugging
Expand All @@ -41,9 +46,13 @@ jobs:
echo "Apply Patches Required: ${{ vars.IS_APPLY_PATCHES_REQUIRED }}"
echo "Unit Tests Required: ${{ vars.IS_UNIT_TESTS_REQUIRED }}"
echo "*** End - Check inputs in repo workflow ***"
ci-dev:
ci-test-only:
if: ${{ github.event.inputs.workflowBranch == 'dev' }}
uses: shardeum/github-automation/.github/workflows/reusable-node-ci.yml@dev
permissions:
issues: write
pull-requests: write
contents: write
with:
node-version: ${{ vars.NODE_VERSION }}
lint-required: ${{ vars.IS_LINT_REQUIRED == 'true' }}
Expand All @@ -52,9 +61,13 @@ jobs:
unit-tests-required: ${{ vars.IS_UNIT_TESTS_REQUIRED == 'true' }}
secrets: inherit

ci-main:
ci:
if: ${{ github.event.inputs.workflowBranch == 'main' || !github.event.inputs.workflowBranch }}
uses: shardeum/github-automation/.github/workflows/reusable-node-ci.yml@main
permissions:
issues: write
pull-requests: write
contents: write
with:
node-version: ${{ vars.NODE_VERSION }}
lint-required: ${{ vars.IS_LINT_REQUIRED == 'true' }}
Expand Down
36 changes: 0 additions & 36 deletions .gitlab-ci.yml

This file was deleted.

13 changes: 13 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# CODEOWNERS file
# To add additional teams to any approval, include them on the same line separated by spaces
# It is best practice to assign a team as a code owner and not an invidual.
# Please submit requests for new teams to Systems and Automation

# Global approval (all files)
# * @shardeum/team-name

# Directory-level approval
/.github/ @shardeum/systems-and-automation

# Specific file rules
# README.md @shardeum/team-name
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@
"release": "np --any-branch --no-cleanup --no-tests --no-yarn",
"test": "jest",
"coverage": "npm test -- --coverage",
"lint": "eslint './src/**/*.ts'",
"lint-windows": "eslint ./src/**/*.ts",
"lint": "eslint \"./src/**/*.ts\"",
"clean": "gts clean",
"compile": "tsc",
"fix": "gts fix",
"build": "npm run compile",
"prepare": "npm run compile",
"pretest": "npm run compile",
"posttest": "npm run lint",
"format-check": "prettier --check \"./src/**/*.ts\""
"format-check": "prettier --check \"./src/**/*.ts\"",
"format-fix": "prettier --write \"./src/**/*.ts\""
},
"repository": {
"type": "git",
Expand Down

0 comments on commit b21840f

Please sign in to comment.