Skip to content

Commit 4e77272

Browse files
Merge branch 'develop' into renovate/configure
2 parents ab16a99 + 8f8c8a9 commit 4e77272

File tree

7 files changed

+149
-181
lines changed

7 files changed

+149
-181
lines changed

.github/workflows/dapp-publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish Docker Image
2+
3+
on:
4+
push:
5+
tags:
6+
- 'protected-data-delivery-dapp-v*'
7+
8+
jobs:
9+
build-test:
10+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@fix/docker/types
11+
with:
12+
image-name: 'docker-regis.iex.ec/product/protected-data-delivery-dapp'
13+
image-tag: ${{ github.ref }} # Use the tag of the commit
14+
push: true
15+
dockerfile: 'packages/protected-data-delivery-dapp/Dockerfile'
16+
security-scan: false
17+
hadolint: false
18+
registry: 'docker-regis.iex.ec'
19+
context: 'packages/protected-data-delivery-dapp'
20+
secrets:
21+
username: ${{ secrets.REGIS_USERNAME }}
22+
password: ${{ secrets.REGIS_PASSWORD }}

.github/workflows/dapp-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Test Docker Image
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*' # Trigger on any pull request
7+
paths:
8+
- 'packages/protected-data-delivery-dapp/**' # Trigger only when changes are made to the dapp
9+
10+
jobs:
11+
build-test:
12+
uses: iExecBlockchainComputing/github-actions-workflows/.github/workflows/docker-build.yml@fix/docker/types
13+
with:
14+
image-name: 'protected-data-delivery-dapp'
15+
image-tag: ${{ github.sha }}
16+
push: false
17+
dockerfile: 'packages/protected-data-delivery-dapp/Dockerfile'
18+
context: 'packages/protected-data-delivery-dapp'
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: CI Sharing Smart Contract
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- '*'
7+
paths:
8+
- 'packages/sharing-smart-contract/**'
9+
10+
concurrency:
11+
group: ${{ github.ref }}-sharing-smart-contract-tests
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build-and-test:
16+
runs-on: ubuntu-latest
17+
permissions:
18+
contents: write
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: '18'
28+
29+
- name: Install Dependencies
30+
working-directory: packages/sharing-smart-contract
31+
run: |
32+
node -v
33+
npm -v
34+
npm ci
35+
36+
- name: Install Foundry
37+
uses: foundry-rs/foundry-toolchain@v1
38+
with:
39+
version: stable
40+
cache: true
41+
42+
- name: Compile
43+
working-directory: packages/sharing-smart-contract
44+
run: npm run compile
45+
46+
- name: Check Format
47+
working-directory: packages/sharing-smart-contract
48+
run: npm run check-format
49+
50+
- name: Lint
51+
working-directory: packages/sharing-smart-contract
52+
run: npm run lint
53+
54+
- name: UML Diagrams
55+
working-directory: packages/sharing-smart-contract
56+
run: npm run uml
57+
58+
- name: Static Analyzer
59+
uses: crytic/[email protected]
60+
id: slither
61+
with:
62+
sarif: result.sarif
63+
fail-on: none
64+
target: 'packages/sharing-smart-contract/'
65+
66+
- name: Start Anvil
67+
run: |
68+
anvil --host 0.0.0.0 --port 8545 --hardfork berlin --fork-url https://bellecour.iex.ec --chain-id 134 --gas-limit 6700000 --gas-price 0 &
69+
70+
- name: Wait for Anvil to start
71+
run: |
72+
timeout=30
73+
interval=1
74+
echo "Waiting for Anvil to start..."
75+
for ((i=0; i<timeout; i++)); do
76+
if nc -z localhost 8545; then
77+
echo "Anvil is operational."
78+
exit 0
79+
fi
80+
echo "Attempt $((i+1)) of $timeout: Anvil is not ready, waiting ${interval}s..."
81+
sleep $interval
82+
done
83+
echo "Error: Anvil did not start within the timeout period."
84+
exit 1
85+
86+
- name: Hardhat Tests
87+
working-directory: packages/sharing-smart-contract
88+
run: npm run test -- --network ci-bellecour-fork
89+
90+
- name: Upgrade Test
91+
working-directory: packages/sharing-smart-contract
92+
run: npm run upgrade-local-fork -- --network local-bellecour-fork
93+
94+
- name: Set Directory Permissions
95+
working-directory: packages/sharing-smart-contract
96+
run: sudo chmod -R 777 .
97+
98+
- name: Forge Tests
99+
working-directory: packages/sharing-smart-contract
100+
run: forge test --no-match-test "invariant" -vvvv
101+
102+
- name: Upload SARIF file
103+
uses: github/codeql-action/upload-sarif@v3
104+
with:
105+
sarif_file: ${{ steps.slither.outputs.sarif }}

packages/protected-data-delivery-dapp/.drone.yml

Lines changed: 0 additions & 51 deletions
This file was deleted.

packages/protected-data-delivery-dapp/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ FROM node:14-alpine3.11 as builder
22

33
WORKDIR /app
44
COPY . .
5-
RUN npm ci
6-
RUN npm run build
5+
RUN npm ci && \
6+
npm run build
77

88
FROM node:14-alpine3.11 as runner
99

packages/sharing-smart-contract/.drone.yml

Lines changed: 0 additions & 126 deletions
This file was deleted.

packages/sharing-smart-contract/test/SupportsInterface.t.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ contract SupportsInterface is Test {
2020
);
2121
}
2222

23-
function testSupports721Interface() external view {
23+
function testSupports721Interface() external {
2424
assertTrue(_dataProtectorSharing.supportsInterface(type(IAccessControl).interfaceId));
2525
}
2626

27-
function testSupportsAccessControlInterface() external view {
27+
function testSupportsAccessControlInterface() external {
2828
assertTrue(_dataProtectorSharing.supportsInterface(type(IERC721).interfaceId));
2929
assertTrue(_dataProtectorSharing.supportsInterface(type(IERC721Metadata).interfaceId));
3030
}

0 commit comments

Comments
 (0)