Skip to content

Commit 56f2681

Browse files
authoredJun 1, 2022
sync: update CI config files (#982)
1 parent c66edc0 commit 56f2681

File tree

2 files changed

+16
-52
lines changed

2 files changed

+16
-52
lines changed
 

‎.github/workflows/automerge.yml

+6-45
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,11 @@
1-
# Automatically merge pull requests opened by web3-bot, as soon as (and only if) all tests pass.
2-
# This reduces the friction associated with updating with our workflows.
1+
# File managed by web3-bot. DO NOT EDIT.
2+
# See https://github.com/protocol/.github/ for details.
33

4-
on: [ pull_request ]
54
name: Automerge
5+
on: [ pull_request ]
66

77
jobs:
8-
automerge-check:
9-
if: github.event.pull_request.user.login == 'web3-bot'
10-
runs-on: ubuntu-latest
11-
outputs:
12-
status: ${{ steps.should-automerge.outputs.status }}
13-
steps:
14-
- uses: actions/checkout@v2
15-
with:
16-
fetch-depth: 0
17-
- name: Check if we should automerge
18-
id: should-automerge
19-
run: |
20-
for commit in $(git rev-list --first-parent origin/${{ github.event.pull_request.base.ref }}..${{ github.event.pull_request.head.sha }}); do
21-
committer=$(git show --format=$'%ce' -s $commit)
22-
echo "Committer: $committer"
23-
if [[ "$committer" != "web3-bot@users.noreply.github.com" ]]; then
24-
echo "Commit $commit wasn't committed by web3-bot, but by $committer."
25-
echo "::set-output name=status::false"
26-
exit
27-
fi
28-
done
29-
echo "::set-output name=status::true"
308
automerge:
31-
needs: automerge-check
32-
runs-on: ubuntu-latest
33-
# The check for the user is redundant here, as this job depends on the automerge-check job,
34-
# but it prevents this job from spinning up, just to be skipped shortly after.
35-
if: github.event.pull_request.user.login == 'web3-bot' && needs.automerge-check.outputs.status == 'true'
36-
steps:
37-
- name: Wait on tests
38-
uses: lewagon/wait-on-check-action@bafe56a6863672c681c3cf671f5e10b20abf2eaa # v0.2
39-
with:
40-
ref: ${{ github.event.pull_request.head.sha }}
41-
repo-token: ${{ secrets.GITHUB_TOKEN }}
42-
wait-interval: 10
43-
running-workflow-name: 'automerge' # the name of this job
44-
- name: Merge PR
45-
uses: pascalgn/automerge-action@741c311a47881be9625932b0a0de1b0937aab1ae # v0.13.1
46-
env:
47-
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
48-
MERGE_LABELS: ""
49-
MERGE_METHOD: "squash"
50-
MERGE_DELETE_BRANCH: true
9+
uses: protocol/.github/.github/workflows/automerge.yml@master
10+
with:
11+
job: 'automerge'

‎.github/workflows/js-test-and-release.yml

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# File managed by web3-bot. DO NOT EDIT.
2+
# See https://github.com/protocol/.github/ for details.
3+
14
name: test & maybe release
25
on:
36
push:
@@ -35,7 +38,7 @@ jobs:
3538
node-version: ${{ matrix.node }}
3639
- uses: ipfs/aegir/actions/cache-node-modules@master
3740
- run: npm run --if-present test:node
38-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
41+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
3942
with:
4043
directory: ./.nyc_output
4144
flags: node
@@ -50,7 +53,7 @@ jobs:
5053
node-version: lts/*
5154
- uses: ipfs/aegir/actions/cache-node-modules@master
5255
- run: npm run --if-present test:chrome
53-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
56+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
5457
with:
5558
directory: ./.nyc_output
5659
flags: chrome
@@ -65,7 +68,7 @@ jobs:
6568
node-version: lts/*
6669
- uses: ipfs/aegir/actions/cache-node-modules@master
6770
- run: npm run --if-present test:chrome-webworker
68-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
71+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
6972
with:
7073
directory: ./.nyc_output
7174
flags: chrome-webworker
@@ -80,7 +83,7 @@ jobs:
8083
node-version: lts/*
8184
- uses: ipfs/aegir/actions/cache-node-modules@master
8285
- run: npm run --if-present test:firefox
83-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
86+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
8487
with:
8588
directory: ./.nyc_output
8689
flags: firefox
@@ -95,7 +98,7 @@ jobs:
9598
node-version: lts/*
9699
- uses: ipfs/aegir/actions/cache-node-modules@master
97100
- run: npm run --if-present test:firefox-webworker
98-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
101+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
99102
with:
100103
directory: ./.nyc_output
101104
flags: firefox-webworker
@@ -110,7 +113,7 @@ jobs:
110113
node-version: lts/*
111114
- uses: ipfs/aegir/actions/cache-node-modules@master
112115
- run: npx xvfb-maybe npm run --if-present test:electron-main
113-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
116+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
114117
with:
115118
directory: ./.nyc_output
116119
flags: electron-main
@@ -125,7 +128,7 @@ jobs:
125128
node-version: lts/*
126129
- uses: ipfs/aegir/actions/cache-node-modules@master
127130
- run: npx xvfb-maybe npm run --if-present test:electron-renderer
128-
- uses: codecov/codecov-action@f32b3a3741e1053eb607407145bc9619351dc93b # v2.1.0
131+
- uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
129132
with:
130133
directory: ./.nyc_output
131134
flags: electron-renderer

0 commit comments

Comments
 (0)
Please sign in to comment.