-
Notifications
You must be signed in to change notification settings - Fork 63
67 lines (55 loc) · 2.12 KB
/
test.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
name: CI Workflow
on: [push]
jobs:
es-node-integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build and Run Bootnode Node
run: |
echo "Test Build and Run Bootnode Node" > es-node-it-bootnode.log&
exit 1
- name: Upload Blobs
run: |
mkdir integration
echo "Test Upload Blobs" > ./integration/upload.log
- name: Test
run: |
echo "Test ES-Node" > es-node-it.log&
echo "Test ItServer" > ./cmd/integration-test-server/itserver.log
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always() # 无论上一步是否失败,都会执行这个步骤
with:
name: result-log
path: |
deploy.log
es-node-it-bootnode.log
./integration/upload.log
es-node-it.log
./cmd/integration-test-server/itserver.log
- name: Send notification email
if: always() # 无论成功或失败都发送通知
uses: dawidd6/action-send-mail@v3
with:
server_address: smtp.gmail.com # 使用 Gmail SMTP
server_port: 465
username: ${{ secrets.SMTP_USERNAME }}
password: ${{ secrets.SMTP_PASSWORD }}
subject: [ethstorage/es-node] GitHub Actions ${{ github.workflow }} Run ${{ job.status }} - ${{ github.sha }}
from: ${{ secrets.SMTP_USERNAME }} # 发件人邮箱
body: |
"GitHub Action job completed with status: ${{ job.status }}! Check the details at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"