Skip to content

Commit 0dc5f7a

Browse files
committed
Add GitHub CI to run tests
1 parent 05a8b14 commit 0dc5f7a

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

.github/workflows/testsuite.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Run testsuite for grep.metacpan
2+
3+
on:
4+
push:
5+
# branches: [ main ]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# Checkout the main repo
14+
- name: Checkout current repo
15+
uses: actions/checkout@v4
16+
with:
17+
path: main-repo
18+
19+
# Checkout the metacpan-cpan-extracted-lite repo
20+
- name: Checkout CPAN repo
21+
uses: actions/checkout@v4
22+
with:
23+
repository: metacpan/metacpan-cpan-extracted-lite
24+
path: metacpan-cpan-extracted-lite
25+
token: ${{ secrets.GITHUB_TOKEN }}
26+
27+
# Set up Docker Compose
28+
- name: Run tests
29+
run: |
30+
cd main-repo
31+
make test

src/t/run-tests.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ cpm install -g \
1313
--with-develop \
1414
--cpanfile cpanfile
1515

16+
## validate the git repository (for CI)
17+
git config --global --add safe.directory /metacpan-cpan-extracted
18+
1619
##
1720
## run the tests
1821
##

0 commit comments

Comments
 (0)