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

Migrate CI to GitHub Actions #1

Merged
merged 6 commits into from
Nov 25, 2024
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.gitlab-ci.yml export-ignore
/.go-license.yaml export-ignore
/.golangci.yml export-ignore
/.mockery.yaml export-ignore
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: tests

on:
push:
branches:
- main
pull_request: ~
workflow_dispatch: ~

permissions:
contents: read

jobs:
lint-go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.23'
- run: make lint-go || (echo "::notice Run 'make lint-fix' locally to fix this" && exit 1)
- run: make lint-license || (echo "::notice Run 'make lint-fix' locally to fix this" && exit 1)

lint-other:
permissions:
contents: read # for actions/checkout to fetch code
statuses: write # for github/super-linter/slim to mark status of each linter run
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: github/super-linter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LINTER_RULES_PATH: '.' # From https://github.com/github/super-linter/pull/859#issuecomment-709625090
VALIDATE_MARKDOWN: true
MARKDOWN_CONFIG_FILE: .markdownlint.yaml
VALIDATE_YAML: true
YAML_CONFIG_FILE: .yamllint.yaml

test:
permissions:
contents: read # for actions/checkout to fetch code
checks: write # for mikepenz/action-junit-report to update checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-go@v5
with:
go-version: '1.23'

- run: make test-with-coverage

- uses: mikepenz/action-junit-report@v5
if: ${{ !cancelled() }}
with:
report_paths: '**/build/unit-tests.xml'

- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/unit-tests.xml

- uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./build/coverage.out
61 changes: 0 additions & 61 deletions .gitlab-ci.yml

This file was deleted.