-
-
Notifications
You must be signed in to change notification settings - Fork 3
148 lines (148 loc) · 4.68 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
name: CI
on:
- push
- pull_request
jobs:
dist:
name: Make distribution using Dist::Inkt
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Cache ~/perl5
uses: actions/cache@v2
with:
key: ${{ runner.os }}-dist-locallib
path: ~/perl5
- name: Perl version
run: |
perl -v
- name: Install cpanm
run: |
curl -L https://cpanmin.us | perl - --sudo App::cpanminus
- name: Install local::lib
run: |
cpanm --local-lib=~/perl5 local::lib && eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
- name: Install Dist::Inkt
shell: bash
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
cpanm -n Dist::Inkt::Profile::TOBYINK
- name: Make distribution
shell: bash
run: |
eval $(perl -I ~/perl5/lib/perl5/ -Mlocal::lib)
~/perl5/bin/distinkt-dist --TRAVIS --targetdir=build
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: ./
inspect:
name: Inspect distribution
needs: dist
runs-on: ubuntu-latest
steps:
- name: Get dist artifact
uses: actions/download-artifact@v2
with:
name: dist
- name: Install dependencies
run: |
sudo apt install tree
- name: Tree
run: |
tree build
- name: Changes
run: cat build/Changes
- name: COPYRIGHT
run: cat build/COPYRIGHT
- name: CREDITS
run: cat build/CREDITS
- name: doap.ttl
run: cat build/doap.ttl
- name: Makefile.PL
run: cat build/Makefile.PL
- name: META.json
run: cat build/META.json
- name: META.yml
run: cat build/META.yml
test:
name: Perl ${{ matrix.perl }} ${{ matrix.os }} ${{ matrix.joblabel }}
needs: dist
runs-on: ${{ ( ( matrix.os == 'strawberry') && 'windows-latest' ) || matrix.os }}
env:
GHA_TESTING_MODE: ${{ matrix.extended_testing }}
GHA_TESTING_COVER: ${{ matrix.coverage }}
GHA_INSTALL_EXTRAS: ${{ matrix.extra_dependencies }}
strategy:
fail-fast: true
matrix:
os: [ 'ubuntu-latest' ]
perl: [ '5.14', '5.16', '5.18', '5.22', '5.24', '5.26', '5.28', '5.30', '5.32', '5.34', '5.36' ]
coverage: [ false ]
threaded: [ null ]
extra_dependencies: [ true ]
extended_testing: [ 'extended' ]
exclude:
- { os: 'windows-latest', perl: '5.4' }
include:
- os: 'ubuntu-latest'
perl: '5.36'
threaded: false
coverage: true
extra_dependencies: true
extended_testing: 'extended'
joblabel: '(Coverage)'
steps:
- name: Get dist artifact
uses: actions/download-artifact@v2
with:
name: dist
- name: Set up perl
uses: shogo82148/actions-setup-perl@v1
with:
perl-version: ${{ matrix.perl }}
multi-thread: ${{ matrix.threaded }}
distribution: ${{ ( ( matrix.os == 'strawberry') && 'strawberry' ) || 'default' }}
- name: Perl version
run: |
perl -v
- name: Install dependencies
run: |
cpanm -n App::GhaProve
cpanm -n --installdeps ./build
- name: Install extra dependencies
if: matrix.extra_dependencies || matrix.coverage
run: cpanm -n --installdeps --with-recommends --with-suggests ./build || true
- name: Install coverage dependencies
if: matrix.coverage
run: |
cpanm -n Devel::Cover
cpanm -n Devel::Cover::Report::Coveralls
cpanm -n Devel::Cover::Report::Codecov
- name: Configure
working-directory: ./build/
run: perl Makefile.PL
- name: Make
working-directory: ./build/
run: perl -MConfig -e'exec $Config{make}'
- name: Clean coverage data
if: matrix.coverage
working-directory: ./build/
run: cover -delete
- name: Test suite
working-directory: ./build/
run: gha-prove -b -r t
- name: Coveralls.io report
if: success() && matrix.coverage
working-directory: ./build/
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: cover -select_re '^blib/lib/' -report coveralls
- name: Codecov.io report
if: success() && matrix.coverage
working-directory: ./build/
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: cover -select_re '^blib/lib/' -report codecov