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

👷 Added CI/CD Configuration #5

Merged
merged 3 commits into from
May 2, 2024
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/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Bug report
about: Discovered a Bug ? Feel free to report it
title: "[BUG] "
labels: bug
assignees: ''

---

**Description**

Please explain what you encountered and why you think it is a bug.
And what the expected behaviour would look like for you.

**Github Runner Logs**
Please paste in your debug runner logs below:

```
REPLACE ME
```

**Workflow Config**
Please paste in your work flow definition:

```
REPLACE ME
```

**Git History**
In case a commit was not discovered correctly or classified wrong please provide the relevant history.
Please use `$ git log --pretty=format:"%H|||%h|||%s|||%an|||%ae"` and paste it below:

```
REPLACE ME
```
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
name: Feature request
about: Are you missing something? Feel free to share your Feature Request
title: "[IDEA]"
labels: enhancement
assignees: ''

---

**What is lacking from the action?**
A clear and concise description of what the problem is.

**How should it be solved?**
Please describe what your expected behaviour would look like.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/questions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: You have a Question? Please leverage discussions!
title: ''
labels: question
assignees: ''

---

Please use the issues section only for bugs and feature requests, questions and such are best handled in the discussion section.
21 changes: 21 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Maintain Changelog
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate Changelog
uses: Templum/gitmoji-changelog@main
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: feature/changelog-update
title: ":memo: Update Changelog for ${{ steps.outputs.for-version }}"
commit-message: ":memo: Update Changelog for ${{ steps.outputs.for-version }}"
29 changes: 29 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Branch Flow
on:
push:
paths-ignore:
- "./action/**"
- "./.devcontainer/**"
- ".gitignore"
- "LICENSE"
- "README.md"
branches:
- "main"
- "develop"
jobs:
flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Dependencies
run: npm ci
- name: Check Lint
run: npm run check:lint
- name: Check Typescript
run: npm run check:tsc
- name: Run Unit Tests
run: npm run test:unit
25 changes: 25 additions & 0 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Maintain Compiled Action
on:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Dependencies
run: npm ci
- name: Compile Action
run: npm run pack
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: feature/changelog-update
title: ":package: Updated compiled action with latest code"
commit-message: ":package: Updated compiled action with latest code"
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Verify Pull Request
on: [pull_request]
permissions:
pull-requests: write
jobs:
flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install Dependencies
run: npm ci
- name: Check Lint
run: npm run check:lint
- name: Check Typescript
run: npm run check:tsc
- name: NCC Build
run: npm run build
- uses: ArtiomTr/jest-coverage-report-action@v2
with:
package-manager: npm
continue-on-error: true


3 changes: 2 additions & 1 deletion __tests__/shared/environment.spec.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { cwd } from 'node:process';
import { getBaseUrl, getRunnerArch, getRunnerOs, getWorkspace, isDebugging } from '../../src/shared/environment.js';

describe('Environment', () => {
Expand Down Expand Up @@ -57,7 +58,7 @@ describe('Environment', () => {
{
method: getWorkspace,
name: 'getWorkspace',
default: '/workspaces/gitmoji-changelog',
default: cwd(),
},
{
method: getRunnerOs,
Expand Down
Loading