Skip to content
Open

G #1900

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
781 commits
Select commit Hold shift + click to select a range
bdb1271
mock: in order mock calls
reynieroz Sep 6, 2024
f17409f
mock: in order mock calls
reynieroz Sep 6, 2024
ea6964c
mock: caller information for unexpected method call
spirin Sep 30, 2024
72e3b61
Merge branch 'master' into mock-simplify-FunctionalOptions-impl
brackendawson Sep 30, 2024
428847e
Merge pull request #1571 from stretchr/mock-simplify-FunctionalOption…
brackendawson Sep 30, 2024
d62ca68
tests
spirin Sep 30, 2024
f3f7181
Merge branch 'master' into unexpected-method-caller-info
spirin Sep 30, 2024
16a09b7
Merge pull request #1644 from spirin/unexpected-method-caller-info
brackendawson Oct 1, 2024
85a5268
Merge branch 'master' into master
brackendawson Oct 2, 2024
c4b8421
Merge pull request #1637 from ReyOrtiz/master
brackendawson Oct 2, 2024
5dc934f
Merge pull request #1629 from HaraldNordgren/patch-1
brackendawson Oct 3, 2024
fed9ee6
Document suite's lack of support for t.Parallel
brackendawson Oct 1, 2024
95d1f9c
Merge pull request #1645 from brackendawson/no-parallel-suite
dolmen Oct 4, 2024
3380867
Add NotErrorAs assertion
palsivertsen Nov 30, 2021
aade845
Improve tests for ErrorIs/ErrorAs
palsivertsen Nov 30, 2021
dc100b1
Review: Drop doc line and fix typo
Oct 4, 2024
f844b26
Review: Expand NotErrorAs func docs
Oct 4, 2024
7f48972
Merge pull request #1129 from palsivertsen/not-error-as
brackendawson Oct 4, 2024
2063e81
assert: fix typos in comments
alexandear Oct 4, 2024
ba3e7c3
mock: fix doc comment for NotBefore
alexandear Oct 4, 2024
55ebaca
Merge pull request #1650 from alexandear/assert-fix-comment-typos
brackendawson Oct 4, 2024
50d5b7e
Merge pull request #1651 from alexandear/mock-fix-not-before-comment
brackendawson Oct 4, 2024
f222751
Merge branch 'master' into fix/suite-test-failures
brackendawson Oct 6, 2024
2fc4e39
Merge pull request #1421 from stevenh/fix/suite-test-failures
brackendawson Oct 6, 2024
3b2754b
remove failure note on require-comments
Neokil Oct 15, 2024
a012e45
Merge pull request #1636 from rainhq/jayd3e.fix_return_arguments
brackendawson Oct 16, 2024
6555fd4
Fix issue #1662 (comparing infs should fail)
ybrustin Oct 16, 2024
f9ccf14
Merge branch 'master' into generate-better-comments-for-require-package
brackendawson Oct 23, 2024
75a239b
Merge pull request #1610 from Neokil/generate-better-comments-for-req…
brackendawson Oct 23, 2024
dce9e58
Merge branch 'master' into fix/equal-exported-values-accepts-everything
brackendawson Oct 23, 2024
7efaf15
Merge pull request #1586 from redachl/fix/equal-exported-values-accep…
brackendawson Oct 23, 2024
9c174eb
fix: compare functional option names for indirect calls
arjun-1 Jul 23, 2024
22d3bd5
in order to remain compatible with go1..19, don't compare function na…
arjun-1 Jul 23, 2024
822223e
fix name regression
arjun-1 Oct 22, 2024
55bac84
reword tests
arjun-1 Oct 24, 2024
fb67df6
no regression
arjun-1 Oct 24, 2024
be992af
trial
arjun-1 Oct 24, 2024
8f049b0
link maintainer manifesto on readme instead of v2 notice
hendrywiranto Dec 10, 2023
2780579
review: use proper github md
hendrywiranto Oct 26, 2024
89352f7
Merge pull request #1518 from hendrywiranto/adjust-readme-remove-v2
brackendawson Oct 26, 2024
8302de9
Merge branch 'master' into master
brackendawson Oct 26, 2024
a1b9c9e
Merge pull request #1663 from ybrustin/master
brackendawson Oct 26, 2024
ea7129e
better fmt
arjun-1 Oct 27, 2024
05f87c0
more similar
arjun-1 Oct 27, 2024
7d99b2b
attempt 2
arjun-1 Oct 27, 2024
118fb83
NotSame should fail if args are not pointers #1661 (#1664)
sikehish Oct 28, 2024
716de8d
Increase timeouts in Test_Mock_Called_blocks to reduce flakiness in CI
sikehish Oct 28, 2024
07bac60
Merge pull request #1667 from sikehish/flaky
brackendawson Oct 28, 2024
2eca2b1
update documentation for the Error function in assert or require pack…
architagr Nov 2, 2024
d27af4e
update documentation for auto require package
architagr Nov 2, 2024
89cbdd9
Merge pull request #1626 from arjun-1/fix-functional-options-diff-ind…
brackendawson Nov 12, 2024
fc69fea
Merge branch 'master' into doc-update-for-error-fn
architagr Nov 17, 2024
7434b14
Improve ErrorIs message when error is nil but an error was expected
tsioftas Nov 18, 2024
19ddcbb
go fmt
tsioftas Nov 18, 2024
d57bac8
refactor: use %q to simplify fmt.Sprintf
alexandear Oct 30, 2024
30f3cef
Apply suggestions from code review
alexandear Dec 10, 2024
014ae9a
Replace deprecated io/ioutil with io and os
alexandear Dec 10, 2024
f8c628e
docs: Fix typo in README
alexandear Dec 16, 2024
cfee234
review feedback
mikeauclair Dec 17, 2024
3d98e69
cleanup
mikeauclair Jun 25, 2024
cbf6e73
simplified renderers
mikeauclair Dec 17, 2024
e6a990c
Merge pull request #1688 from alexandear/docs-fix-typo
brackendawson Dec 21, 2024
7c367bb
Merge pull request #1684 from alexandear/refactor-replace-deprecated-…
brackendawson Dec 21, 2024
ca6698b
assert.ErrorAs: log target type
craig65535 Dec 31, 2024
ccb5e7f
Remove redundant returns
craig65535 Dec 31, 2024
1c717c0
Add return
craig65535 Dec 31, 2024
0c935ad
Merge branch 'master' into doc-update-for-error-fn
architagr Jan 3, 2025
c60c3bd
dereference target
craig65535 Jan 3, 2025
3cf0926
docs: Format examples in README
alexandear Dec 16, 2024
dfda68b
Verify formatting of code snippets in CI
alexandear Jan 20, 2025
f784abc
Merge pull request #1345 from craig65535/fix-assert-erroras
brackendawson Mar 18, 2025
098128f
chore: update docs for Unset #1621
techfg Mar 18, 2025
89086b0
Document consequences of calling t.FailNow()
greg0ire Mar 19, 2025
53e0c91
Merge branch 'master' into fix-fail-message-formatting
brackendawson Mar 21, 2025
5a5ac85
Merge pull request #1062 from lambdanis/fix-fail-message-formatting
brackendawson Mar 21, 2025
b1c9368
Improve existing docs
greg0ire Mar 21, 2025
65f7386
Merge pull request #1710 from greg0ire/doc-goroutine-restriction
brackendawson Mar 21, 2025
c6ac9bb
chore: update per PR feedback
techfg Mar 21, 2025
1e7fb58
Merge pull request #1709 from techfg/chore/issue-1621-update-docs
brackendawson Mar 22, 2025
3b8bd9b
Merge pull request #1614 from DevotedHealth/mauclair-call-stack-perf
brackendawson Mar 22, 2025
a9e8aed
Remove mistakenly added .ci.gofmt.sh
alexandear Mar 23, 2025
33be8f9
Move to jobs.build
alexandear Mar 23, 2025
75df9d5
Update mdsf
alexandear Mar 23, 2025
16020e8
Merge pull request #1687 from alexandear/docs-format-go-examples
brackendawson Mar 23, 2025
c3915e8
Merge branch 'master' into refactor/simplify-with-sprintf-q
brackendawson Mar 23, 2025
a948a8c
Merge pull request #1674 from alexandear/refactor/simplify-with-sprin…
brackendawson Mar 23, 2025
b561f16
Correct maintainers list
brackendawson Mar 23, 2025
d0e0f49
Propose Christophe Colombier (ccoVeille) as approver
brackendawson Mar 23, 2025
5ac6528
Merge pull request #1716 from brackendawson/update-maintainers
brackendawson Mar 24, 2025
e6575e0
Update mock.go
mikeauclair Mar 24, 2025
500cb17
Merge branch 'master' into doc-update-for-error-fn
architagr Mar 25, 2025
0b6039e
assert: remove deprecated build constraints
alexandear Oct 30, 2024
5ed1b90
Update assert/assertions_test.go
tsioftas Apr 3, 2025
e7b1880
update error message based on suggestion
tsioftas Apr 3, 2025
d5cd75a
update documentation of assert package to mention that all function r…
architagr Apr 22, 2025
2a9c44b
fix Subset/NotSubset when calling with mixed input types (array/slice…
siliconbrain Apr 23, 2025
e32ceae
Update assert/doc.go
architagr Apr 29, 2025
992db2b
upadte doc
architagr Apr 29, 2025
0c9a9e0
Update assert/doc.go
architagr May 2, 2025
a31a53e
Merge pull request #1615 from DevotedHealth/mauclair-mock-match-sprintf
brackendawson May 6, 2025
f4244f1
Merge pull request #1427 from cszczepaniak/cs/quicker_eventually
brackendawson May 6, 2025
d0c350a
Update assert/doc.go
architagr May 7, 2025
01b9a87
Merge branch 'master' into doc-update-for-error-fn
architagr May 7, 2025
520d02e
Merge pull request #1675 from architagr/doc-update-for-error-fn
brackendawson May 7, 2025
d338e95
Merge pull request #1681 from tsioftas/tsioftas/erroris-improve
brackendawson May 8, 2025
121ddb9
clarify behavior of Subset/NotSubset when passing maps
siliconbrain May 7, 2025
111716d
Merge pull request #1729 from siliconbrain/fix-subset-notsubset-mixed…
brackendawson May 8, 2025
c2116b4
Improve ErrorAs failure message when error is nil
ccoVeille May 8, 2025
296df14
Merge pull request #1734 from stretchr/errors-asserter
brackendawson May 12, 2025
016e2e9
Merge pull request #1671 from alexandear-org/chore/remove-deprecated-…
brackendawson May 12, 2025
9bcca2f
Format assertions files with gofumpt
ccoVeille May 8, 2025
2035e7d
Merge pull request #1739 from ccoveille-forks/asserter-gofumpt
dolmen May 22, 2025
9fc264e
assert: add IsNotType (#1730)
bartventer May 22, 2025
af716f8
CI: fix shebang in .ci.*.sh scripts
dolmen May 22, 2025
559d23a
check test failure message for Empty and NotEmpty
ccoVeille May 17, 2025
11522a0
Merge pull request #1746 from stretchr/dolmen/fix-CI-script-shebang
brackendawson May 23, 2025
603c2a0
assert,require: enable parallel testing on (almost) all top tests
dolmen May 23, 2025
83d32a3
Merge pull request #1747 from stretchr/dolmen/assert,require-enable-p…
dolmen May 25, 2025
d2ddb5d
suite.Passed: add one more status test report (#1706)
Ararsa-Derese May 25, 2025
bf47cc8
assert/tests: add Helper() in all testing.T mocks
dolmen Jul 11, 2023
b534400
require/tests: add Helper() method to all mocks of *testing.T
dolmen Jul 11, 2023
e2ad959
mock/tests: add method Helper() to all mock of *testing.T
dolmen Jul 11, 2023
8f73f15
assert.CollectT: add Helper() method
dolmen Jul 11, 2023
c98ef6e
Merge pull request #1423 from stretchr/add-Helper-method-in-tests
brackendawson May 27, 2025
3c1541a
Improve usage of Sprintf with Same/NotSame
ccoVeille May 13, 2025
4eb688b
assert.JSONEq: shortcut if same strings
dolmen May 28, 2025
4f71159
assert.YAMLEq: shortcut if same strings
dolmen May 28, 2025
8b3dc18
mock: enable parallel testing on internal testsuite
dolmen May 28, 2025
186f165
Merge pull request #1756 from stretchr/dolmen/mock-Parallel-testing
dolmen May 30, 2025
82767ae
suite: cleanup use of 'testing' internals at runtime
dolmen May 27, 2025
0ff4bb4
Merge pull request #1751 from stretchr/dolmen/suite-fix-use-of-testin…
dolmen May 30, 2025
a5d5c33
Merge pull request #1745 from ccoveille-forks/improve-tests-empty-not…
dolmen May 31, 2025
250eaa5
deps: fix dependency cycle with objx
dolmen Mar 4, 2024
553e822
go.mod: add comment about how to fix dep cycle with objx
dolmen May 25, 2025
5d95b18
Merge pull request #1567 from stretchr/fix-dependency-cycle
brackendawson Jun 2, 2025
c519b79
assert.Empty: comprehensive doc of "Empty"-ness rules
dolmen May 28, 2025
7a1b408
doc: improve godoc of top level 'testify' package
dolmen Jun 2, 2025
0b5b5e6
assert: add Benchmark_isEmpty
dolmen Jun 3, 2025
890082e
assert.Empty: refactor isEmpty (1)
dolmen Jun 3, 2025
acd15f6
assert.Empty: refactor using reflect.Value.IsZero()
dolmen Jun 3, 2025
26b02e2
Merge pull request #1761 from dolmen/refactor-isEmpty-using-reflect.V…
dolmen Jun 4, 2025
7127b60
assert.ErrorAs: simplify retrieving the type name
ccoVeille May 13, 2025
5488b21
assert: improve EqualValues test coverage to 100%
dolmen Jun 4, 2025
7c2bbf9
Merge pull request #1763 from stretchr/sketch/improve-equalvalues-cov…
dolmen Jun 16, 2025
b50b016
suite.Run: simplify running of Setup/TeardownSuite (#1769)
Jun 19, 2025
5c94955
assert.CallerInfo: micro optimization by using LastIndexByte
dolmen Jun 16, 2025
fac5d47
invalid method test signatures fails as subtest, other continues
vyas-git Jun 24, 2025
6c516f8
assert.CallerInfo: cleanup
dolmen Jun 16, 2025
d912549
assert/tests: enable parallel testing for Test{,No}{File,Dir}Exists
dolmen Jun 16, 2025
50277a8
assert/tests: simplify Test{No,}{File,Dir}Exists
dolmen Jun 16, 2025
44c0281
assert/tests: improve failure reporting in Test{No,}{File,Dir}Exists
dolmen Jun 16, 2025
39b912b
Merge pull request #1766 from stretchr/dolmen/assert-testing-parallel…
dolmen Jun 30, 2025
87101a6
suite.Run: refactor handling of stats
dolmen Jun 5, 2025
c58bc90
Merge pull request #1764 from stretchr/dolmen/suite-refactor-stats-fo…
dolmen Jun 30, 2025
7d37b5c
suite: refactor methodFilter
dolmen Mar 6, 2024
bc7459e
suite: faster filtering of methods (-testify.m)
dolmen May 27, 2025
929a212
Merge pull request #1758 from stretchr/dolmen/suite-faster-method-fil…
dolmen Jun 30, 2025
7218e03
improve error msg
api-card May 15, 2025
aafb604
mock: improve formatting of error message
3scalation May 22, 2025
a53be35
Improve captureTestingT helper
ccoVeille May 8, 2025
fada016
Merge branch 'master' into master
vyas-git Jul 4, 2025
69831f3
build(deps): bump actions/checkout from 4 to 5
dependabot[bot] Aug 12, 2025
b7801fb
Merge pull request #1778 from stretchr/dependabot/github_actions/acti…
brackendawson Aug 17, 2025
7b2204f
fix(pkg-mock): avoid panic when expected type is nil in Arguments.Diff
mutaiib Jul 26, 2025
b9a23f4
refactor: unexport and convert `Arguments.SafeName` method to standal…
mutaiib Aug 1, 2025
8976267
mock: document `IsType` interface limitation and add tests
mutaiib Aug 10, 2025
354fc33
Update mock/mock.go
mutaiib Aug 18, 2025
e3d64ad
Update mock/mock_test.go
mutaiib Aug 18, 2025
e581b36
Merge pull request #1775 from mutaiib/bugfix/panic-methodcalled-mutex…
brackendawson Aug 18, 2025
af16170
CI: test also with Go 1.23
dolmen Aug 25, 2025
f4f5960
Merge pull request #1783 from stretchr/ci-go1.23
brackendawson Aug 25, 2025
5fa380c
Promote ccoVeille to maintainer
brackendawson Aug 26, 2025
5e25bfb
mock: Test that arguments with mutating stringers match
brackendawson Aug 27, 2025
0cdb408
Revert "Merge pull request #1615 from DevotedHealth/mauclair-mock-mat…
brackendawson Aug 27, 2025
c952903
Merge pull request #1786 from brackendawson/1785-mock-argument-stringers
brackendawson Aug 27, 2025
5f941c8
Update suite/suite.go
vyas-git Aug 28, 2025
96f97a2
Merge branch 'master' into master
vyas-git Aug 28, 2025
e8daaac
Merge pull request #1665 from vyas-git/master
brackendawson Aug 29, 2025
ce48cb3
Move difflib into testify
brackendawson Aug 29, 2025
4f554a8
Fix #1399: Always report error message on PanicsWithError mismatch
olivergondza Jun 8, 2023
38d9e83
Fix tests to work with go 1.19
olivergondza Jun 8, 2023
94ddd7e
refact(test): Make use of captureTestingT over CollectT
olivergondza Jun 2, 2025
a87733a
Refactor PanicsWithError for increased readability
olivergondza Sep 1, 2025
dc65928
build(deps): bump actions/setup-go from 5 to 6
dependabot[bot] Sep 4, 2025
297f37e
Merge pull request #1708 from brackendawson/internal-difflib
brackendawson Sep 9, 2025
5afd74f
Merge pull request #1784 from brackendawson/ccoVeille-maintainer
brackendawson Sep 9, 2025
cbd8483
Merge pull request #1790 from stretchr/dependabot/github_actions/acti…
brackendawson Sep 9, 2025
b5a0821
Merge pull request #1400 from olivergondza/issue-1399
brackendawson Sep 10, 2025
59a17f5
Constrain untested behavior of YAMLEq
brackendawson Sep 11, 2025
a78e373
Document that YAMLEq only compared the first document in the YAML str…
brackendawson Sep 11, 2025
b1007aa
IsIncreasing et al can return false w/out failing
brackendawson Oct 29, 2021
ff76a29
Clarify error message for incorrect use of IsIncreasing et al
brackendawson Aug 8, 2023
65e0b94
Add missing Helper calls to IsIncreasing et al
brackendawson Feb 24, 2024
f03d037
Merge pull request #1787 from brackendawson/1419-fail-assertions
brackendawson Sep 11, 2025
392c0bc
add type to error message of assert.Same
egawata Sep 12, 2025
b9167da
Merge pull request #1792 from egawata/assert_same_message_with_type
brackendawson Sep 12, 2025
e8c7bc9
Add example to YAMLEq
brackendawson Sep 12, 2025
2b945c3
Update assert/assertions.go
brackendawson Sep 12, 2025
5fa984a
Merge pull request #1791 from brackendawson/YAMLEq-document-multidoc
brackendawson Sep 13, 2025
0bf6b94
mock.AssertExpectationsForObjects fix panic with wrong testObject type.
brackendawson Sep 15, 2025
a0ac157
Merge pull request #1795 from brackendawson/1227-AssertExpectationsFo…
brackendawson Sep 15, 2025
3f28143
Remove ineffective inline code blocks
brackendawson Sep 16, 2025
c58ac3d
_codegen: copy package github.com/ernesto-jimenez/gogen/imports
dolmen Aug 25, 2025
242e746
_codegen: use our imported copy of github.com/ernesto-jimenez/gogen
dolmen Aug 25, 2025
6c30310
Merge pull request #1782 from dolmen-go/codegen-copy-dependency
dolmen Sep 16, 2025
1eb5fc0
Truncate very long objects in test failure messages
brackendawson Oct 3, 2024
28dac59
Don't shadow builtin max
brackendawson Sep 18, 2025
d5be414
Don't change the format of failure messages when fixing 1525
brackendawson Sep 18, 2025
5a4a1cc
Use links for previously invalid inline code blocks
brackendawson Sep 18, 2025
49bcd2a
Merge pull request #1646 from brackendawson/token-too-long
brackendawson Sep 19, 2025
feb1324
Merge pull request #1714 from brackendawson/doc-inline-code
brackendawson Sep 19, 2025
050de1e
EMERITUS.md: add @tylerb
dolmen Oct 16, 2025
bd59f5d
tag generated assertions as non-generated in new .gitattributes
ubunatic Oct 22, 2025
429ee0b
Merge pull request #1815 from ubunatic/git-attrs
dolmen Oct 22, 2025
74a2b94
chore: import go-spew from https://github.com/davecgh/go-spew
ccoVeille Nov 18, 2025
dc193d1
chore: remove unused file from gospew vendor
ccoVeille Nov 18, 2025
cfca3c7
chore: move file in spew vendoring
ccoVeille Nov 18, 2025
3dce331
chore: format all files with go fmt
ccoVeille Nov 18, 2025
3987752
chore: use the vendored gospew library
ccoVeille Nov 18, 2025
65697ce
Merge pull request #1827 from ccoveille-forks/vendor-gospew
brackendawson Nov 28, 2025
43f6438
require: fix godoc generation for assertions returning a bool
bakhromumarovpf Feb 14, 2026
aaef048
Merge pull request #1850 from Baxromumarov/fix-require-doc-generation
dolmen Feb 17, 2026
556f9ed
fix(require): correct CollectT references in comments
a2not Feb 17, 2026
101072d
Merge pull request #1821 from a2not/fix-doc-require_collect-not-exist
dolmen Feb 17, 2026
967a7b7
fix: update EventuallyWithTf comment examples and codegen
a2not Feb 18, 2026
cddda8c
Merge pull request #1842 from a2not/fix-EventuallyWithTf-doc-callback…
dolmen Feb 23, 2026
30c1157
Merge branch 'master' into EMERITUS-tylerb
dolmen Feb 23, 2026
c7007d3
Merge pull request #1812 from stretchr/EMERITUS-tylerb
dolmen Feb 23, 2026
f58776d
deps: bump objx to v0.5.3 and remove dependency cycle issue
ccoVeille Nov 15, 2025
b13d7e3
CI: test also with Go 1.24
alexandear Feb 25, 2026
5f80e4a
Merge pull request #1856 from alexandear-org/chore-add-go-1-24
ccoVeille Mar 4, 2026
d75b707
Merge pull request #1823 from ccoveille-forks/bump-objx
dolmen May 6, 2026
21beeae
Pin GitHub Actions hashes
SuperQ May 7, 2026
c920f80
Merge pull request #1883 from SuperQ/superq/pin_actions
dolmen May 7, 2026
15f6826
assert: fix NotSubset error messages using %%#v instead of %%q
May 9, 2026
246de45
Merge pull request #1888 from nghiack7/fix/not-subset-format
dolmen May 11, 2026
fdc6894
suite: fix panic when SetupTest skips with HandleStats
blackwell-systems Apr 27, 2026
37a3cb7
Merge pull request #1877 from blackwell-systems/fix/suite-skip-stats-…
dolmen May 11, 2026
ef0097b
CI: add _readme-gofmt tool to reformat Go code in README
dolmen May 11, 2026
d204718
Merge pull request #1889 from stretchr/dolmen/readme-gofmt-pure-go
dolmen May 13, 2026
a66fd44
CI: add check of GitHub Action pinned hashes against tag
dolmen May 7, 2026
a463c8c
Merge pull request #1885 from stretchr/dolmen/ci-check-ghactions-hashes
dolmen May 13, 2026
d2699be
_codegen: modernize
dolmen May 13, 2026
098f8d7
_codegen: use strings.Builder
dolmen May 13, 2026
dc20f41
Merge pull request #1890 from stretchr/dolmen/codegen-modernize
dolmen May 13, 2026
a11649e
assert: make *AssertionFunc type just aliases
dolmen Mar 4, 2024
12f8b56
Merge pull request #1563 from stretchr/make-AssertionFunc-types-aliases
MovieStoreGuy May 15, 2026
a55c40d
Create go.yml
Premiermoney May 25, 2026
01697dd
Create .yml
Premiermoney May 25, 2026
aaabd4c
Merge branch 'codeowners' into master
Premiermoney May 25, 2026
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
55 changes: 55 additions & 0 deletions .ci.ghactions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash

# MIT License
#
# Copyright (c) 2026 Olivier Mengué and contributors.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

#
# Verify that hashes of GitHub actions match the declared tag in attached comment.
#

set -euo pipefail

declare -A seen
status=0

for w in .github/workflows/*.yml
do
sed -n -e '/uses: / s!^ *-\{0,1\} uses: \([^@]*\)@\([0-9a-f][0-9a-f]*\) *# *\(v.*\)$!\1 \2 \3!p' "$w" | while read -r action hash tag
do
if (( ${seen["$action-$hash-$tag"]:-0} )); then
printf "\e[1;32m%s: %s@%s == %s\e[m\n" "$w" "$action" "$tag" "$hash"
continue
fi
seen["$action-$hash-$tag"]=1

if eval "$( curl -s -H "Accept: application/vnd.github+json" \
"https://api.github.com/repos/$action/commits/$tag" | jq -r '.sha == "'"$hash"'"' )"
then
printf "\e[1;32m%s: %s@%s == %s\e[m\n" "$w" "$action" "$tag" "$hash"
else
printf "\e[1;31m%s: %s@%s != %s\e[m\n" "$w" "$action" "$tag" "$hash"
status=1
fi
done
done

exit $status
18 changes: 18 additions & 0 deletions .ci.gofmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

set -euo pipefail

if [ -n "$(gofmt -l .)" ]; then
echo "Go code is not formatted:"
gofmt -d .
exit 1
fi

go run ./_readme-gofmt/main.go

go generate ./...
if [ -n "$(git status -s -uno)" ]; then
echo "Go generate output does not match commit."
echo "Did you forget to run go generate ./... ?"
exit 1
fi
16 changes: 16 additions & 0 deletions .ci.gogenerate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env bash

# If GOMOD is defined we are running with Go Modules enabled, either
# automatically or via the GO111MODULE=on environment variable. Codegen only
# works with modules, so skip generation if modules is not in use.
if [[ -z "$(go env GOMOD)" ]]; then
echo "Skipping go generate because modules not enabled and required"
exit 0
fi

go generate ./...
if [ -n "$(git diff)" ]; then
echo "Go generate had not been run"
git diff
exit 1
fi
5 changes: 5 additions & 0 deletions .ci.govet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -e

go vet ./...
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# This file is used to configure Git attributes for the repository.
# It is particularly useful for managing how generated code is treated in pull requests.
# For more information, see:
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github

# Code for assertions and requirements is generated automatically by _codegen.
# This also updates code comments and code examples in the documentation.
# These comments and examples must be reviewed when they change,
# since updates to the generated code comments may not always be correct.
assert/*.go linguist-generated=false
require/*.go linguist-generated=false
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Bug report
about: Format to report a bug
title: ''
labels: bug
assignees: ''

---

<!-- If this is a question, consider using the discussion section of this repo -->
<!-- Here: https://github.com/stretchr/testify/discussions/new?category=q-a -->

## Description
<!-- A detailed description of the bug -->

## Step To Reproduce
<!-- Steps or code snippet to reproduce the behavior -->

## Expected behavior
<!-- A clear and concise description of what you expected to happen -->

## Actual behavior
<!-- What testify does -->
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Propose a new feature
title: ''
labels: enhancement
assignees: ''

---

<!-- If this is a question, consider using the discussion section of this repo -->
<!-- Here: https://github.com/stretchr/testify/discussions/new?category=q-a -->

## Description
<!-- A clear and concise description of what feature you are proposing -->

## Proposed solution
<!-- Optionally a suggested implementation -->

## Use case
<!-- What is the motivation? What workarounds have you used? -->
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 2
updates:
- package-ecosystem: gomod
directory: /
schedule:
interval: daily
- package-ecosystem: github-actions
directory: /
schedule:
interval: daily
15 changes: 15 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Summary
<!-- High-level, one sentence summary of what this PR accomplishes -->

## Changes
<!-- * Description of change 1 -->
<!-- * Description of change 2 -->
<!-- ... -->

## Motivation
<!-- Why were the changes necessary. -->

<!-- ## Example usage (if applicable) -->

## Related issues
<!-- Put `Closes #XXXX` for each issue number this PR fixes/closes -->
28 changes: 28 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go

name: Go

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:

build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'

- name: Build
run: go build -v ./...

- name: Test
run: go test -v ./...
48 changes: 48 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: All builds
on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
go_version:
- stable
- oldstable
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go_version }}
- run: ./.ci.gogenerate.sh
- run: ./.ci.gofmt.sh
- run: ./.ci.govet.sh
- run: go test -v -race ./...

test-old-go:
runs-on: ubuntu-latest
strategy:
matrix:
go_version:
- "1.17"
- "1.18"
- "1.19"
- "1.20"
- "1.21"
- "1.22"
- "1.23"
- "1.24"
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go_version }}
- run: go test -v -race ./...

check-actions-hashes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- run: ./.ci.ghactions.sh
21 changes: 21 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Create release from new tag

# this flow will be run only when new tags are pushed that match our pattern
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Create GitHub release from tag
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
with:
generate_release_notes: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,9 @@ _testmain.go
*.exe

.DS_Store

# Output of "go test -c"
/assert/assert.test
/require/require.test
/suite/suite.test
/mock/mock.test
7 changes: 0 additions & 7 deletions .travis.gofmt.sh

This file was deleted.

13 changes: 0 additions & 13 deletions .travis.gogenerate.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .travis.govet.sh

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

50 changes: 50 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Contributing to Testify

So you'd like to contribute to Testify? First of all, thank you! Testify is widely used, so each
contribution has a significant impact within the Golang community! Below you'll find everything you
need to know to get up to speed on the project.

## Philosophy

The Testify maintainers generally attempt to follow widely accepted practices within the Golang
community. That being said, the first priority is always to make sure that the package is useful to
the community. A few general guidelines are listed here:

*Keep it simple (whenever practical)* - Try not to expand the API unless the new surface area
provides meaningful benefits. For example, don't add functions because they might be useful to
someone, someday. Add what is useful to specific users, today.

*Ease of use is paramount* - This means good documentation and package organization. It also means
that we should try hard to use meaningful, descriptive function names, avoid breaking the API
unnecessarily, and try not to surprise the user.

*Quality isn't an afterthought* - Testify is a testing library, so it seems reasonable that we
should have a decent test suite. This is doubly important because a bug in Testify doesn't just mean
a bug in our users' code, it means a bug in our users' tests, which means a potentially unnoticed
and hard-to-find bug in our users' code.

## Pull Requests

We welcome pull requests! Please include the following in the description:

* Motivation, why your change is important or helpful
* Example usage (if applicable)
* Whether you intend to add / change behavior or fix a bug

Please be aware that the maintainers may ask for changes. This isn't a commentary on the quality of
your idea or your code. Testify is the result of many contributions from many individuals, so we
need to enforce certain practices and patterns to keep the package easy for others to understand.
Essentially, we recognize that there are often many good ways to do a given thing, but we have to
pick one and stick with it.

See `MAINTAINERS.md` for a list of users who can approve / merge your changes.

## Issues

If you find a bug or think of a useful feature you'd like to see added to Testify, the best thing
you can do is make the necessary changes and open a pull request (see above). If that isn't an
option, or if you'd like to discuss your change before you write the code, open an issue!

Please provide enough context in the issue description that other members of the community can
easily understand what it is that you'd like to see.

Loading