Skip to content

Commit 88bce8f

Browse files
authored
Update CI (#50)
1 parent 6d7c9d5 commit 88bce8f

File tree

5 files changed

+209
-101
lines changed

5 files changed

+209
-101
lines changed

.github/workflows/cloc.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: cloc
22
on:
33
pull_request:
4+
5+
# Cancel the workflow in progress in newer build is about to start.
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
8+
cancel-in-progress: true
9+
410
jobs:
511
cloc:
612
runs-on: ubuntu-latest
@@ -17,14 +23,14 @@ jobs:
1723
- name: Count Lines Of Code
1824
id: loc
1925
run: |
20-
curl -OL https://github.com/vearutop/sccdiff/releases/download/v1.0.1/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz
26+
curl -sLO https://github.com/vearutop/sccdiff/releases/download/v1.0.2/linux_amd64.tar.gz && tar xf linux_amd64.tar.gz && echo "b17e76bede22af0206b4918d3b3c4e7357f2a21b57f8de9e7c9dc0eb56b676c0 sccdiff" | shasum -c
2127
OUTPUT=$(cd pr && ../sccdiff -basedir ../base)
22-
OUTPUT="${OUTPUT//'%'/'%25'}"
23-
OUTPUT="${OUTPUT//$'\n'/'%0A'}"
24-
OUTPUT="${OUTPUT//$'\r'/'%0D'}"
28+
echo "${OUTPUT}"
29+
OUTPUT="${OUTPUT//$'\n'/%0A}"
2530
echo "::set-output name=diff::$OUTPUT"
2631
2732
- name: Comment Code Lines
33+
continue-on-error: true
2834
uses: marocchino/sticky-pull-request-comment@v2
2935
with:
3036
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-unit-cov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
tools: composer
3333

3434
- name: Populate vendor
35-
run: '[ -e vendor ] || (composer install && patch -s -p0 < ./tests/phpunit.patch)'
35+
run: '[ -e vendor ] || composer install'
3636

3737
- name: Run Tests With Coverage
3838
run: make deps test-coverage && bash <(curl -s https://codecov.io/bash)

.github/workflows/test-unit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
tools: composer
3232

3333
- name: Populate vendor
34-
run: '[ -e vendor ] || (composer install && patch -s -p0 < ./tests/phpunit.patch)'
34+
run: '[ -e vendor ] || composer install'
3535

3636
- name: Run Tests
3737
run: make deps test

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"ext-json": "*"
1414
},
1515
"require-dev": {
16-
"phpunit/phpunit": "^4.8.23"
16+
"phperf/phpunit": "4.8.37"
1717
},
1818
"autoload": {
1919
"psr-4": {

0 commit comments

Comments
 (0)