Skip to content

Commit

Permalink
ci(workflows): Reviewed and replaced contents of workflows with share…
Browse files Browse the repository at this point in the history
…able workflow repo
  • Loading branch information
AsifNawaz-cnic committed Jan 16, 2024
1 parent dd95550 commit 1e6373b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 121 deletions.
35 changes: 0 additions & 35 deletions .github/workflows/auto-merge-dependabot-pr.yml

This file was deleted.

38 changes: 5 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,39 +2,11 @@ name: Release
on:
push:
branches:
- 'master'
- master

jobs:
build:
name: "Build"
uses: ./.github/workflows/test.yml
permissions:
contents: read

release:
name: Release
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: build
permissions:
contents: write
issues: write
deployments: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup NodeJS ${{ vars.RTLDEV_MW_CI_NODE_VERSION }}
uses: actions/setup-node@v4
with:
node-version: '${{ vars.RTLDEV_MW_CI_NODE_VERSION }}'
check-latest: true
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.RTLDEV_MW_CI_TOKEN }}
TEAMS_NOTIFICATION_URI: ${{ secrets.RTLDEV_MW_CI_NOTIFICATION_URI }}
COMMIT_SHA: ${{ github.sha }}
run: npx semantic-release
uses: centralnicgroup-opensource/rtldev-middleware-shareable-workflows/.github/workflows/release.yml
secrets: inherit
with:
repository: ${{ github.repository }}
63 changes: 10 additions & 53 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,56 +1,13 @@
name: Linting & Testing
name: Dependabot auto-merge & tests
on:
workflow_call:
pull_request:
types:
- opened
- synchronize

jobs:
test:
name: 🧪 Linting
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: '${{ vars.RTLDEV_MW_CI_GOLANG_VERSION }}'
check-latest: true
- name: Super Linter Code Base
uses: github/super-linter/slim@v5
env:
FILTER_REGEX_INCLUDE: "/*|/scripts/*|updateVersion.sh|apiclient.go"
DEFAULT_BRANCH: master
VALIDATE_GO: true
VALIDATE_BASH: true
VALIDATE_ALL_CODEBASE: false
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run build
run: go build .
- name: Run vet
run: go vet .

test_matrix:
name: 🧪 Testing
runs-on: ${{ vars.RTLDEV_MW_CI_OS }}
needs: test
strategy:
matrix:
go-version: ${{ fromJson(vars.RTLDEV_MW_CI_GOLANG_MATRIX) }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Run build
run: go build .
- name: Run test
run: ./scripts/test-go.sh
tests:
uses: centralnicgroup-opensource/rtldev-middleware-shareable-workflows/.github/workflows/auto-merge-dependabot-pr.yml
secrets: inherit
with:
repository: ${{ github.repository }}

0 comments on commit 1e6373b

Please sign in to comment.