Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Updated workflows and added codeowners #140

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Default code owners for entire repository
* @hashgraph/developer-advocates

#########################
##### Core Files ######
#########################

# NOTE: Must be placed last to ensure enforcement over all other rules

# Protection Rules for Github Configuration Files and Actions Workflows
/.github/ @hashgraph/release-engineering @hashgraph/release-engineering-managers
/.github/workflows/ @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates

# NPM and typescript protections
**/.npmignore @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/package.json @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/package-lock.json @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/tsconfig.json @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/typedoc.json @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/jest.config.ts @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates

# Rules for prettier
**/.prettierignore @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/.prettierrc @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates

# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval)
/CODEOWNERS @hashgraph/release-engineering @hashgraph/release-engineering-managers

# Protect the repository root files
/README.md @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/LICENSE @hashgraph/release-engineering @hashgraph/release-engineering-managers

# Git Ignore definitions
**/.gitignore @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
**/.gitignore.* @hashgraph/release-engineering @hashgraph/release-engineering-managers @hashgraph/developer-advocates
9 changes: 7 additions & 2 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ jobs:
runs-on: [self-hosted, Linux, medium, ephemeral]

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Use Node.js
uses: actions/setup-node@v4.0.2
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: '18'

Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,17 @@ jobs:
contents: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout repository
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6


- name: Setup NodeJS Environment
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18.x

Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,26 @@ jobs:
contents: read

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Setup NodeJS Environment
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: 18.x

- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- name: Install dependencies
run: npm install

- name: Run tests (Forked PR)
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository && !cancelled() && !failure() }}
run: npm run test

- name: Test
uses: ArtiomTr/jest-coverage-report-action@v2
if: ${{ ((github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) || github.event_name == 'push') && !cancelled() && !failure() }}
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules
dist
*.sw[a-z]
**/.idea