Implement upgraded version for price feed smart contract #842
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR CI | |
on: | |
pull_request: | |
branches: [ main, development ] | |
permissions: | |
contents: read | |
security-events: write | |
env: | |
FOUNDRY_PROFILE: ci | |
jobs: | |
check: | |
strategy: | |
fail-fast: true | |
matrix: | |
system: | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
runs-on: ${{ matrix.system.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly | |
- name: Use Node.js latest | |
uses: actions/setup-node@v4 | |
with: | |
node-version: latest | |
- name: Install yarn | |
run: npm install --global yarn | |
- name: Install dependencies | |
shell: bash | |
run: yarn --prefer-offline | |
working-directory: web3-functions/redstone | |
- name: Check TypeScript files | |
if: ${{ contains(matrix.system.os, 'ubuntu') == true }} | |
run: yarn format | |
working-directory: web3-functions/redstone | |
- name: Check formatting for TypeScript files | |
if: ${{ contains(matrix.system.os, 'ubuntu') == true }} | |
run: | | |
if [ -z "$(git status --untracked-files=no --porcelain)" ]; then | |
echo "All files formatted" | |
else | |
echo "Running format is required" | |
exit 1 | |
fi | |
working-directory: web3-functions/redstone | |
- name: Check formatting | |
if: ${{ contains(matrix.system.os, 'ubuntu') == true }} | |
run: | | |
forge fmt --check | |
id: formatting | |
- name: Run Forge build | |
run: | | |
forge --version | |
forge build --sizes | |
id: build | |
- name: Run Forge tests | |
run: | | |
forge test -vvv | |
id: test | |
- name: Run Slither | |
if: ${{ contains(matrix.system.os, 'ubuntu') == true }} | |
uses: crytic/[email protected] | |
with: | |
solc-version: 0.8.23 | |
sarif: results.sarif | |
fail-on: medium | |
slither-args: --exclude-dependencies --exclude-low --exclude-informational --filter-paths "Ed25519.sol" | |
id: slither | |
- name: Upload SARIF file | |
if: ${{ contains(matrix.system.os, 'ubuntu') == true }} | |
uses: github/codeql-action/upload-sarif@v3 | |
with: | |
sarif_file: ${{ steps.slither.outputs.sarif }} |