Skip to content

Commit

Permalink
chore: cleaning up github actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
newlight77 committed Feb 1, 2024
1 parent 5529d14 commit 9431d66
Showing 1 changed file with 41 additions and 141 deletions.
182 changes: 41 additions & 141 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,63 +6,7 @@ on:
pull_request:
branches: [ main ]

env:
TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

jobs:
# display-variables:
# name: display ci variables
# runs-on: ubuntu-latest
# environment: CI
# steps:
# - name: Use variables
# run: |
# echo "SECRET_TOKEN : $SECRET_TOKEN"
# echo "VAR_TOKEN : $VARS_TOKEN"
# echo "ENV_TOKEN : $ENV_TOKEN"
# env:
# SECRET_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# VARS_TOKEN: ${{ vars.SLACK_BOT_TOKEN }}
# ENV_TOKEN: ${{ env.TOKEN }}

# build:
# runs-on: ubuntu-latest
# needs: display-variables
# steps:
# - name: Checkout 🛎️
# uses: actions/checkout@v3
# with:
# persist-credentials: false
# - name: install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# run_install: false
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '16'
# cache: 'pnpm'
# # - name: cache build /dist directories
# # id: cache-dist
# # uses: actions/cache@v3
# # with:
# # path: ./**/dist
# # key: dist-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
# # restore-keys: dist-${{ github.job }}-${{ github.ref_name }}-
# # - name: turbo cache
# # id: turbo-cache
# # uses: actions/cache@v3
# # with:
# # path: .turbo
# # key: turbo-${{ github.job }}-${{ github.ref_name }}-${{ github.sha }}
# # restore-keys: |
# # turbo-${{ github.job }}-${{ github.ref_name }}-
# - name : install dependencies
# run: make install
# - name : build
# run: make build

test-unit:
runs-on: ubuntu-latest
# needs: build
Expand Down Expand Up @@ -171,33 +115,33 @@ jobs:
**/coverage/smoke/lcov.info
**/coverage/smoke/coverage-final.json
retention-days: 1
# lint:
# runs-on: ubuntu-latest
# needs:
# - test-unit
# - test-features
# steps:
# - name: Checkout 🛎️
# uses: actions/checkout@v3
# with:
# persist-credentials: false
# - name: install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8
# run_install: false
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: '16'
# cache: 'pnpm'
# - name : install dependencies
# run: make install-offline
# - name : build
# run: make build
# - name : lint
# run: make lint

lint:
runs-on: ubuntu-latest
needs:
- test-unit
- test-features
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false
- name: install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'pnpm'
- name : install dependencies
run: make install-offline
- name : build
run: make build
- name : lint
run: make lint

coverage:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -240,62 +184,18 @@ jobs:
cache: 'pnpm'
- name : install dependencies
run: make install-offline
- name : prepare and merge coverage files
run: make merge-coverage
- name: codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info # optional
flags: unittests # optional
name: codecov-umbrella # optional
fail_ci_if_error: true # optional (default = false)
verbose: false # optional (default = false)

# ci-passed-notif:
# needs:
# - coverage
# - lint
# runs-on: ubuntu-latest
# environment: CI
# steps:
# - name: slack notificaiton - ci passed
# uses: slackapi/slack-github-action@v1
# env:
# SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
# with:
# channel-id: "C05UA1LUW1H" #ci
# payload: |
# {
# "text": "github workflow",
# "attachments": [
# {
# "color": "warning",
# "pretext": "Quality Gate bypassed with no-coverage",
# "fields": [
# {
# "title": "Repo",
# "value": "<https://github.com/${{ github.repository }} | ${{ github.repository }}>",
# "short": true
# },
# {
# "title": "Pull Request",
# "short": true,
# "value": "<https://github.com/${{ github.repository }}/pull/${{ github.event.pull_request.number }}>"
# },
# {
# "title": "Status",
# "short": true,
# "value": "CI Passed"
# },
# {
# "title": "Branch",
# "value": "${{ github.head_ref || github.ref_name }}",
# "short": true
# }
# ],
# "footer_icon": "https://github.githubassets.com/favicon.ico",
# "footer": "<https://github.com/${{ github.repository }} | ${{ github.repository }}/pull/${{ github.event.pull_request.number }}>"
# }
# ]
# }
# - name: codecov
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage/lcov.info # optional
# flags: unittests # optional
# name: codecov-umbrella # optional
# fail_ci_if_error: true # optional (default = false)
# verbose: false # optional (default = false)

# - uses: SonarSource/sonarcloud-github-action@v2.0.0
# env:
# SONAR_TOKEN: ${{ env.SONAR_TOKEN }}

0 comments on commit 9431d66

Please sign in to comment.