Skip to content

Commit 3fd9710

Browse files
Merge pull request #2119 from skalenetwork/develop
New beta
2 parents f3f8fd7 + bd17a23 commit 3fd9710

File tree

181 files changed

+29567
-7844
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+29567
-7844
lines changed

.clang-format-ignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
./test/tools/libtesteth/*
2+
./test/tools/fuzzTesting/*
3+
./test/tools/libtestutils/*
4+
./test/tools/jsontests/*
5+
./test/unittests/external-dependencies/*
6+
./test/unittests/libskutils/*
7+
./test/unittests/libdevcrypto/*
8+
./test/unittests/libethcore/*
9+
./test/unittests/libethereum/*
10+
./test/unittests/libweb3core/*
11+
./test/unittests/libweb3jsonrpc/*
12+
./test/unittests/libtesteth/*
13+
./test/unittests/libdevcore/*
14+
./test/unittests/libethashseal/*
15+
./test/unittests/mapreduce_consensus/*
16+
./test/unittests/libevm/*
17+
./test/unittests/libskale/*
18+
./storage_benchmark/*
19+
./skale-vm/*

.github/workflows/custom_build.yml

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ on:
2222
options:
2323
- Debug
2424
- RelWithDebInfo
25+
- Release
2526
default: RelWithDebInfo
2627

2728
jobs:

.github/workflows/nightly.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: Run nightly tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 0 * * *'
6+
7+
workflow_dispatch:
8+
inputs:
9+
pr_number:
10+
description: 'Specify a PR number to run tests on (optional)'
11+
required: false
12+
type: string
13+
14+
defaults:
15+
run:
16+
shell: bash
17+
18+
jobs:
19+
identify-prs:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
pr-data: ${{ steps.get-prs.outputs.pr-data }}
23+
steps:
24+
- name: Identify Open Non-Draft PRs with Recent Commits (or Specific PR)
25+
id: get-prs
26+
uses: actions/github-script@v6
27+
with:
28+
script: |
29+
const oneDayAgo = new Date();
30+
oneDayAgo.setDate(oneDayAgo.getDate() - 1);
31+
const prNumber = '${{ github.event.inputs.pr_number }}';
32+
33+
let prs = [];
34+
35+
if (prNumber) {
36+
// Fetch the specified PR
37+
const pr = await github.rest.pulls.get({
38+
owner: context.repo.owner,
39+
repo: context.repo.repo,
40+
pull_number: parseInt(prNumber),
41+
});
42+
prs = [pr.data];
43+
} else {
44+
// Fetch all PRs
45+
const allPRs = await github.rest.pulls.list({
46+
owner: context.repo.owner,
47+
repo: context.repo.repo,
48+
state: 'open',
49+
});
50+
51+
prs = allPRs.data.filter(pr => !pr.draft);
52+
}
53+
54+
const filteredPRs = [];
55+
for (const pr of prs) {
56+
// Get commits to check for recent activity
57+
const commits = await github.rest.pulls.listCommits({
58+
owner: context.repo.owner,
59+
repo: context.repo.repo,
60+
pull_number: pr.number,
61+
per_page: 100,
62+
});
63+
64+
const recentCommits = commits.data.filter(commit => {
65+
const commitDate = new Date(commit.commit.author.date);
66+
return commitDate >= oneDayAgo;
67+
});
68+
69+
if (recentCommits.length > 0 || prNumber) {
70+
filteredPRs.push({ branch: pr.head.ref, sha: pr.head.sha, number: pr.number });
71+
}
72+
}
73+
74+
console.log("Filtered PRs:", filteredPRs);
75+
core.setOutput('pr-data', JSON.stringify(filteredPRs));
76+
77+
run-all-tests:
78+
needs: [identify-prs]
79+
if: ${{ needs.identify-prs.outputs.pr-data != '[]' && needs.identify-prs.outputs.pr-data != '' }}
80+
strategy:
81+
matrix:
82+
pr: ${{ fromJson(needs.identify-prs.outputs.pr-data) }}
83+
uses: ./.github/workflows/test-all.yml
84+
with:
85+
branch_name: ${{ matrix.pr.branch }}
86+
sha: ${{ matrix.pr.sha }}
87+
secrets:
88+
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
89+
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}

0 commit comments

Comments
 (0)