mirror of
https://github.com/avelino/awesome-go.git
synced 2026-04-11 14:21:47 +08:00
fix: prevent auto-merge when tests fail
Two issues fixed: 1. README.md: fix alphabetical order of go-date-fns/go-datebin in Date and Time section (caused TestAlpha to fail) 2. pr-quality-check.yaml: add tests job as dependency for auto-merge, so PRs cannot be auto-merged when tests fail Previously the auto-merge job only depended on quality checks, ignoring the tests workflow result entirely. Now auto-merge requires both quality AND tests to pass. https://claude.ai/code/session_01MZaC8jqKerzm1PTf1hKFsP
This commit is contained in:
parent
d1cdfff7e4
commit
930dae28c5
21
.github/workflows/pr-quality-check.yaml
vendored
21
.github/workflows/pr-quality-check.yaml
vendored
@ -102,10 +102,27 @@ jobs:
|
|||||||
|
|
||||||
_This is expected for maintenance, documentation, or workflow PRs._
|
_This is expected for maintenance, documentation, or workflow PRs._
|
||||||
|
|
||||||
|
tests:
|
||||||
|
name: Run tests
|
||||||
|
needs: detect
|
||||||
|
if: needs.detect.outputs.is_package_pr == 'true'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: golang:latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
|
||||||
|
- name: Get dependencies
|
||||||
|
run: go get -v -t -d ./...
|
||||||
|
|
||||||
|
- name: Run tests
|
||||||
|
run: go test main_test.go main.go
|
||||||
|
|
||||||
auto-merge:
|
auto-merge:
|
||||||
name: Enable auto-merge
|
name: Enable auto-merge
|
||||||
needs: quality
|
needs: [quality, tests]
|
||||||
if: always() && needs.quality.result == 'success'
|
if: always() && needs.quality.result == 'success' && needs.tests.result == 'success'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Enable auto-merge via squash
|
- name: Enable auto-merge via squash
|
||||||
|
|||||||
@ -948,8 +948,8 @@ _Libraries for working with dates and times._
|
|||||||
- [durafmt](https://github.com/hako/durafmt) - Time duration formatting library for Go.
|
- [durafmt](https://github.com/hako/durafmt) - Time duration formatting library for Go.
|
||||||
- [feiertage](https://github.com/wlbr/feiertage) - Set of functions to calculate public holidays in Germany, incl. specialization on the states of Germany (Bundesländer). Things like Easter, Pentecost, Thanksgiving...
|
- [feiertage](https://github.com/wlbr/feiertage) - Set of functions to calculate public holidays in Germany, incl. specialization on the states of Germany (Bundesländer). Things like Easter, Pentecost, Thanksgiving...
|
||||||
- [go-anytime](https://github.com/ijt/go-anytime) - Parse dates/times like "next dec 22nd at 3pm" and ranges like "from today until next thursday" without knowing the format in advance.
|
- [go-anytime](https://github.com/ijt/go-anytime) - Parse dates/times like "next dec 22nd at 3pm" and ranges like "from today until next thursday" without knowing the format in advance.
|
||||||
- [go-datebin](https://github.com/deatil/go-datebin) - A simple datetime parse pkg.
|
|
||||||
- [go-date-fns](https://github.com/chmenegatti/go-date-fns) - A comprehensive date utility library for Go, inspired by date-fns, with 140+ pure and immutable functions.
|
- [go-date-fns](https://github.com/chmenegatti/go-date-fns) - A comprehensive date utility library for Go, inspired by date-fns, with 140+ pure and immutable functions.
|
||||||
|
- [go-datebin](https://github.com/deatil/go-datebin) - A simple datetime parse pkg.
|
||||||
- [go-faketime](https://github.com/harkaitz/go-faketime) - A simple `time.Now()` that honors the faketime(1) utility.
|
- [go-faketime](https://github.com/harkaitz/go-faketime) - A simple `time.Now()` that honors the faketime(1) utility.
|
||||||
- [go-persian-calendar](https://github.com/yaa110/go-persian-calendar) - The implementation of the Persian (Solar Hijri) Calendar in Go (golang).
|
- [go-persian-calendar](https://github.com/yaa110/go-persian-calendar) - The implementation of the Persian (Solar Hijri) Calendar in Go (golang).
|
||||||
- [go-str2duration](https://github.com/xhit/go-str2duration) - Convert string to duration. Support time.Duration returned string and more.
|
- [go-str2duration](https://github.com/xhit/go-str2duration) - Convert string to duration. Support time.Duration returned string and more.
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user