Skip to content

Commit

Permalink
bt-1: + github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
anton-otroshchenko committed Aug 21, 2023
1 parent 4624044 commit d5e4bee
Show file tree
Hide file tree
Showing 5 changed files with 156 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
name: Bug report
about: Summary
title: '[BUG]'
labels: bug
assignees: ''
---

**Description:**
A clear and concise description of what the bug is.

**Preconditions:**

**Environment:**
OS
Browser
Version

**Steps to reproduce:**

1.

**Actual Result:**

**Expected Result:**

**Visual Proof (screenshots, videos, text):**

**Severity:**
Blocker (S1)
Critical (S2)
Major (S3)
Minor (S4)
Low/Trivial (S5)
20 changes: 20 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
root: '*'

workflows: '.github/**/*'

shared: 'shared/**/*'

backend:
- any:
- 'backend/**/*'
- '!backend/.env.example'

frontend:
- any:
- 'frontend/**/*'
- '!frontend/.env.example'

ENV:
- 'backend/.env.example'
- 'frontend/.env.example'
- 'lambdas/.env.example'
5 changes: 5 additions & 0 deletions .github/pr-branch-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
development:
base: development

production:
base: production
65 changes: 65 additions & 0 deletions .github/workflows/ci-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Continuous Integration Pull Request

on:
pull_request:
types:
- assigned
- unassigned
- opened
- edited
- synchronize
- reopened
- labeled
- unlabeled
- ready_for_review

workflow_dispatch:

concurrency:
group: ci-pr-${{ github.ref }}
cancel-in-progress: true

jobs:
ci-pr:
permissions:
contents: read
pull-requests: write

runs-on: ubuntu-latest

steps:
- name: Checkout Source Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install Dependencies
run: |
npm install
- name: Lint Commits
run: |
npx commitlint --from ${{ github.event.pull_request.base.sha }} --to ${{ github.event.pull_request.head.sha }} --verbose
- name: Lint Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run: |
npx danger ci --failOnErrors --text-only
- name: Add Folder Labels
uses: actions/labeler@v4
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
sync-labels: true

- name: Add Environment Labels
uses: ffittschen/pr-branch-labeler@v1
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Continuous Integration

on:
pull_request:
branches:
- development
- production

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
runs-on: ubuntu-latest

steps:
- name: Checkout Source Code
uses: actions/checkout@v3

- name: Install NodeJS
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc

- name: Install Dependencies
run: |
npm install
- name: Code Linting
run: |
npm run lint

0 comments on commit d5e4bee

Please sign in to comment.