[ETHEREUM-CONTRACTS] overhaul of SuperTokenV1Library & legacy lib deprecation #7116
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: CI | Feature Branches | |
on: | |
# TODO We no longer do these, instead you always need to create a pull request | |
# Triggered by internal pushes | |
# push: | |
# branches-ignore: ["dev", "release-*"] | |
# | |
# NOTE To continue the old behaviour, these code snipeets is needed in the check job | |
## triggered by internal pushes or external PRs | |
## if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != 'superfluid-finance/protocol-monorepo' | |
merge_group: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: Checking what packages need to be built | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: nix develop .#ci-minimum -c bash -xe {0} | |
outputs: | |
build_solidity_semantic_money: ${{ env.BUILD_SOLIDITY_SEMANTIC_MONEY }} | |
build_ethereum_contracts: ${{ env.BUILD_ETHEREUM_CONTRACTS }} | |
build_hot_fuzz: ${{ env.BUILD_HOT_FUZZ }} | |
build_subgraph: ${{ env.BUILD_SUBGRAPH }} | |
build_sdk_core: ${{ env.BUILD_SDK_CORE }} | |
build_spec_haskell: ${{ env.BUILD_SPEC_HASKELL }} | |
build_automation_contracts: ${{ env.BUILD_AUTOMATION_CONTRACTS }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: DeterminateSystems/nix-installer-action@v13 | |
- name: Initialize nix dev shell | |
run: | | |
node --version | |
yarn --version | |
shellcheck --version | |
actionlint --version | |
- name: Show contexts | |
env: | |
HEAD_REF: ${{ github.head_ref }} | |
GITHUB_REF: ${{ github.ref }} | |
run: | | |
echo github.event_name: ${{ github.event_name }} | |
echo github.sha: ${{ github.sha }} | |
echo github.repository: ${{ github.repository }} | |
echo github.ref: "$GITHUB_REF" | |
echo github.head_ref: "$HEAD_REF" | |
echo github.base_ref: ${{ github.base_ref }} | |
- name: Run global lint | |
run: | | |
npm run lint:shellcheck | |
npm run lint:actionlint | |
- name: Create build set | |
run: tasks/create-build-set.sh ${{ github.sha }} dev origin | |
test-spec-haskell: | |
name: Test Spec Haskell (Feature Branch) | |
uses: ./.github/workflows/call.test-spec-haskell.yml | |
needs: [check] | |
if: needs.check.outputs.build_spec_haskell | |
test-solidity-semantic-money: | |
name: Test Solidity Semantic Money Library (Feature Branch) | |
uses: ./.github/workflows/call.test-solidity-semantic-money.yml | |
needs: [ check ] | |
if: needs.check.outputs.build_solidity_semantic_money | |
test-ethereum-contracts: | |
name: Test ethereum-contracts (Feature Branch) | |
uses: ./.github/workflows/call.test-ethereum-contracts.yml | |
needs: [check] | |
if: needs.check.outputs.build_ethereum_contracts | |
with: | |
run-coverage-tests: false | |
coverage-ethereum-contracts: | |
name: Coverage Test ethereum-contracts (Feature Branch) | |
uses: ./.github/workflows/call.test-ethereum-contracts.yml | |
needs: [check] | |
if: needs.check.outputs.build_ethereum_contracts | |
with: | |
run-coverage-tests: true | |
test-hot-fuzz: | |
name: Hot Fuzz Superfluid Protocol (Feature Branch) | |
uses: ./.github/workflows/call.test-hot-fuzz.yml | |
needs: [ check ] | |
if: needs.check.outputs.build_hot_fuzz | |
# sdk-core integration test + local subgraph w/ local sdk-core | |
test-sdk-core: | |
name: Test sdk-core (Feature Branch) | |
uses: ./.github/workflows/call.test-sdk-core.yml | |
needs: [check] | |
if: needs.check.outputs.build_sdk_core | |
with: | |
subgraph-release: local | |
subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test | |
run-coverage-tests: false | |
coverage-sdk-core: | |
name: Coverage Test sdk-core (Feature Branch) | |
uses: ./.github/workflows/call.test-sdk-core.yml | |
needs: [check] | |
if: needs.check.outputs.build_sdk_core | |
with: | |
subgraph-release: local | |
subgraph-endpoint: http://localhost:8000/subgraphs/name/superfluid-test | |
run-coverage-tests: true | |
test-subgraph: | |
name: Test Subgraph (Feature Branch) | |
uses: ./.github/workflows/call.test-local-subgraph.yml | |
needs: [check] | |
if: needs.check.outputs.build_subgraph | |
test-automation-contracts: | |
name: Test Automation Contracts (Feature Branch) | |
uses: ./.github/workflows/call.test-automation-contracts.yml | |
needs: [check] | |
if: needs.check.outputs.build_automation_contracts | |
upload-coverage-reports: | |
name: Upload Coverage Reports (Feature Branch) | |
uses: ./.github/workflows/call.upload-coverage-reports.yml | |
needs: [coverage-ethereum-contracts, coverage-sdk-core] | |
secrets: | |
codecov_token: ${{ secrets.CODECOV_TOKEN }} | |
# Note: | |
# | |
# Since we have a poor man's incremental CI where packages that are not affected in the feature branche | |
# is not tested, it is important to distinguish jobs that were skipped versus jobs that were failed. And | |
# this aggregation job does just that. | |
all-packages-tested: | |
name: All packages tested (Feature Branch) | |
runs-on: ubuntu-latest | |
if: always() | |
needs: [ test-spec-haskell | |
, test-solidity-semantic-money | |
, test-ethereum-contracts, coverage-ethereum-contracts | |
, test-hot-fuzz | |
, test-sdk-core, coverage-sdk-core | |
, test-subgraph | |
, test-automation-contracts | |
] | |
steps: | |
- name: Test Results | |
run: | | |
function check_result() { | |
local package_name="$1" | |
local result="$2" | |
if [ "$result" == "skipped" ];then | |
echo "Skipped job: $package_name." | |
else | |
echo "Checking if the job \"$package_name\" passes..." | |
test "$result" == "success" | |
echo "Passed." | |
fi | |
} | |
check_result spec-haskell ${{ needs.test-spec-haskell.result }} | |
check_result solidity-semantic-money ${{ needs.test-solidity-semantic-money.result }} | |
check_result test-ethereum-contracts ${{ needs.test-ethereum-contracts.result }} | |
check_result coverage-ethereum-contracts ${{ needs.coverage-ethereum-contracts.result }} | |
check_result hot-fuzz ${{ needs.test-hot-fuzz.result }} | |
check_result test-sdk-core ${{ needs.test-sdk-core.result }} | |
check_result coverage-sdk-core ${{ needs.coverage-sdk-core.result }} | |
check_result subgraph ${{ needs.test-subgraph.result }} | |
check_result automation-contracts ${{ needs.test-automation-contracts.result }} |