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

Improve CI script #47

Merged
merged 2 commits into from
Apr 15, 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
12 changes: 3 additions & 9 deletions .github/workflows/test.yaml → .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,13 @@ jobs:
- uses: actions/setup-go@v4
with:
go-version: ">=1.20"
- name: Install pre-commit
run: pip install pre-commit
- name: Run pre-commit hook
uses: pre-commit/action@v3.0.0
- name: Run tests
run: go test -race -coverprofile=coverage.out -covermode=atomic -v ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
- name: Run lints
run: pre-commit run --all-files
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
windows:
test-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,19 @@ jobs:
args: release --clean
env:
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

merge:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: develop
- name: Merge the new version into develop
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git fetch --tags origin
git merge ${REF##*/}
git push
env:
REF: ${{ github.event.push.ref }}
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ repos:
exclude: ^\.bumpversion\.cfg$
- id: trailing-whitespace
- id: detect-private-key
- repo: https://github.com/APIDevTools/swagger-cli
rev: v4.0.4
hooks:
- id: swagger-validation
- repo: https://github.com/golangci/golangci-lint
rev: v1.52.2
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A Pixeldrain client
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/test.yaml)
[![Go application](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml/badge.svg)](https://github.com/jkawamoto/go-pixeldrain/actions/workflows/ci.yaml)
[![Go Reference](https://pkg.go.dev/badge/github.com/jkawamoto/go-pixeldrain.svg)](https://pkg.go.dev/github.com/jkawamoto/go-pixeldrain)
[![codecov](https://codecov.io/gh/jkawamoto/go-pixeldrain/branch/master/graph/badge.svg?token=ppX3MVIqWA)](https://codecov.io/gh/jkawamoto/go-pixeldrain)
[![Release](https://img.shields.io/badge/release-0.7.1-brightgreen.svg)](https://github.com/jkawamoto/go-pixeldrain/releases/tag/v0.7.1)
Expand Down
2 changes: 1 addition & 1 deletion openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
swagger: "2.0"
info:
title: Pixeldrain API
version: 2023-04-02
version: "2023-04-02"
host: pixeldrain.com
basePath: /api
schemes:
Expand Down