Skip to content

Commit

Permalink
added yml for programming languages (#5)
Browse files Browse the repository at this point in the history
* added yml for programming languages

* added workflows for c++ and approved

* updated changes

* fixed approved label buil failing

* fixed approved label build

* updated approved-label build file

* updated approved-label build file

* updated approved-label build file

* added latest version of it

---------

Co-authored-by: madhuredra <madhuredra.tiwari@zemosolabs.com>
  • Loading branch information
dev-madhurendra and madhuredra authored Sep 23, 2023
1 parent 902c421 commit 4795dde
Show file tree
Hide file tree
Showing 6 changed files with 151 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @dev-madhurendra
* @dev-madhurendra @Suryac72
14 changes: 14 additions & 0 deletions .github/workflows/approved-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
on: pull_request_review
name: Label approved pull requests
jobs:
labelWhenApproved:
name: Label when approved
runs-on: ubuntu-latest
steps:
- name: Label when approved
uses: abinoda/label-when-approved-action@1.0.5
env:
APPROVALS: "2"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ADD_LABEL: "approved"
REMOVE_LABEL: "awaiting%20review"
64 changes: 64 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "Code Scanning - Action"

on:
push:
branches: [main]
paths:
- "C++/**"
- ".github/workflows/codeql.yml"
pull_request:
branches: [main]
schedule:
# ┌───────────── minute (0 - 59)
# │ ┌───────────── hour (0 - 23)
# │ │ ┌───────────── day of the month (1 - 31)
# │ │ │ ┌───────────── month (1 - 12 or JAN-DEC)
# │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT)
# │ │ │ │ │
# │ │ │ │ │
# │ │ │ │ │
# * * * * *
- cron: '30 1 * * 0'

jobs:
CodeQL-Build:
# CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
runs-on: ubuntu-latest

permissions:
# required for all workflows
security-events: write

# only required for workflows in private repositories
actions: read
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
with:
languages: cpp

# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below).
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language

#- run: |
# make bootstrap
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
36 changes: 36 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Doxygen CI

on:
push:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install requirements
run: |
brew install graphviz ninja doxygen
- name: configure
run: cmake -G Ninja -B ./build -S .
- name: build
run: cmake --build build -t doc
- name: gh-pages
uses: actions/checkout@v3
with:
ref: "gh-pages"
clean: false
- name: Move & Commit files
run: |
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
rm -rf d* && rm *.html && rm *.svg && rm *.map && rm *.md5 && rm *.png && rm *.js && rm *.css
git add .
cp -rp ./build/html/* . && rm -rf ./build && ls -lah
git add .
git commit -m "Documentation for $GITHUB_SHA" || true
git push --force || true
23 changes: 23 additions & 0 deletions .github/workflows/jsBuild.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Build
on:
push:
branches:
- main
paths:
- "JavaScript/**"
- ".github/workflows/jsBuild.yml"
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=dev-madhurendra_OOPs
sonar.organization=dev-madhurendra

# This is the name and version displayed in the SonarCloud UI.
#sonar.projectName=OOPs
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
#sonar.sourceEncoding=UTF-8

0 comments on commit 4795dde

Please sign in to comment.