This repository was archived by the owner on Jan 6, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathconfig.yml
More file actions
81 lines (70 loc) · 2.03 KB
/
config.yml
File metadata and controls
81 lines (70 loc) · 2.03 KB
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
version: 2.1
jobs:
build:
docker:
- image: circleci/python:3.6
steps:
- checkout
- run:
name: Generate tests
command: make all
- run:
name: Save tests for deployment
command: |
mkdir /tmp/workspace
cp -r tests /tmp/workspace/
git log -1 >> /tmp/workspace/latest_commit_message
- persist_to_workspace:
root: /tmp/workspace
paths:
- tests
- latest_commit_message
commit:
docker:
- image: circleci/python:3.6
steps:
- attach_workspace:
at: /tmp/workspace
- add_ssh_keys:
fingerprints:
- "01:85:b6:36:96:a6:84:72:e4:9b:4e:38:ee:21:97:fa"
- run:
name: Checkout test repository
command: |
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
git clone git@github.com:ethereum/eth2.0-tests.git
- run:
name: Commit and push generated tests
command: |
cd eth2.0-tests
git config user.name 'eth2TestGenBot'
git config user.email '47188154+eth2TestGenBot@users.noreply.github.com'
for filename in /tmp/workspace/tests/*; do
rm -rf $(basename $filename)
cp -r $filename .
done
git add .
if git diff --cached --exit-code >& /dev/null; then
echo "No changes to commit"
else
echo -e "Update generated tests\n\nLatest commit message from eth2.0-test-generators:\n" > commit_message
cat /tmp/workspace/latest_commit_message >> commit_message
git commit -F commit_message
git push origin master
fi
workflows:
version: 2.1
build_and_commit:
jobs:
- build:
filters:
tags:
only: /.*/
- commit:
requires:
- build
filters:
tags:
only: /.*/
branches:
ignore: /.*/