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

chore: Migrate jobs to gh action #38

Merged
merged 3 commits into from
Dec 13, 2023
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
13 changes: 13 additions & 0 deletions .github/template/prepare-checks/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Prepare checks
description: Prepares everything for code check execution

runs:
using: "composite"

steps:
# uses an older go version by default, so configure go with newest version
- name: Setup golang
uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: true
14 changes: 0 additions & 14 deletions .github/workflows/markdown-link-check.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/pull-code-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: PR Code checks

on:
pull_request:
branches:
- "main"
- "release-*"
paths-ignore:
- 'docs/**'
- '**.md'
workflow_dispatch:

jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Prepare test
uses: "./.github/template/prepare-checks"

- name: Run tests
run: make test

linting:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Prepare test
uses: "./.github/template/prepare-checks"

- name: Run linting
uses: golangci/golangci-lint-action@v3
with:
install-mode: binary
version: latest
args: --timeout=5m --config=./.golangci.yaml

markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Validate links
uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-quiet-mode: 'yes'
use-verbose-mode: 'yes'
config-file: '.mlc.config.json'
folder-path: '.'
max-depth: -1
check-modified-files-only: 'yes'
base-branch: ${{ github.base_ref }}
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
name: PR Title Check
run-name: ${{github.event.pull_request.title}}
name: PR Governance

on:
pull_request_target:
branches:
- "main"
- "release-*"
types:
- opened
- reopened
- edited
- synchronize
workflow_dispatch:

jobs:
check:
name: Check Title
pr-title-check:
runs-on: ubuntu-latest
steps:
- uses: amannn/action-semantic-pull-request@c3cd5d1ea3580753008872425915e343e351ab54
- name: Validate title
uses: amannn/action-semantic-pull-request@47b15d52c5c30e94a17ec87eb8dd51ff5221fed9
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down
File renamed without changes.