mkdir testrepo
cd testrepo
exec git init --initial-branch=main .

cp ../src/.pint.hcl .
env GIT_AUTHOR_NAME=pint
env GIT_AUTHOR_EMAIL=pint@example.com
env GIT_COMMITTER_NAME=pint
env GIT_COMMITTER_EMAIL=pint@example.com
exec git add .
exec git commit -am 'import rules and config'

exec git checkout -b v1
cp ../src/a.yml a.yml
exec git add a.yml
exec git commit -am 'v1'

exec git checkout -b v2
cp ../src/b.yml b.yml
exec git add b.yml
exec git commit -am 'v2'

exec pint -l debug --no-color ci
! stdout .
stderr 'level=DEBUG msg="Got branch information" base=main current=v2'
stderr 'level=DEBUG msg="Git file change" change=A path=a.yml commit=.*'
stderr 'level=DEBUG msg="Git file change" change=A path=b.yml commit=.*'
stderr 'level=DEBUG msg="Skipping file due to include/exclude rules" path=a.yml'
stderr 'level=DEBUG msg="Skipping file due to include/exclude rules" path=b.yml'

-- src/a.yml --
- record: rule1
  expr: sum(foo) bi()
-- src/b.yml --
- record: rule1
  expr: sum(foo) bi()
-- src/.pint.hcl --
ci {
  baseBranch = "main"
}
parser {
  exclude = [".*.yml"]
  relaxed = [".*"]
}
