diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..d2ae1ab --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,68 @@ +name: CI + +# on: +# pull_request_review: +# types: [submitted] +# workflow_dispatch: + +on: + pull_request: + branches: + - main + workflow_dispatch: + +jobs: + Regression: + #if: (github.event.review.state == 'approved') && (github.event.pull_request.base.ref == 'main') + runs-on: ubuntu-latest + + container: + image: public.ecr.aws/certora/cvt-image:2024.10.23-4499-c4f8ad4 + + env: + ETHSCAN_API_KEY: ${{ secrets.ETHSCAN_API_KEY }} + QUORUM_PATH: "." + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} + + permissions: + id-token: write + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Quorum Repo + run: pip3.11 install . + + - name: Execute Regression Tests + run: | + pytest Quorum/tests --maxfail=1 --disable-warnings --tb=short + CheckProposal --config Quorum/execution.json + + Update-Version: + if: ${{ github.event_name != 'workflow_dispatch' }} + needs: Regression + runs-on: ubuntu-latest + permissions: + id-token: write + contents: write + actions: write + + steps: + - uses: actions/checkout@v4 + + - name: Change version + run: python3 -c "from datetime import datetime; print(datetime.now().strftime('%Y%m%d.%H%M%S.%f'))" > version + + - name: Configure Git + run: | + git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" + git config --global user.name "$GITHUB_ACTOR" + + - name: Commit and push version change + run: | + git add . + git commit -m "Auto change version." + git push origin HEAD:$GITHUB_HEAD_REF -f + diff --git a/.github/workflows/regression.yml b/.github/workflows/regression.yml deleted file mode 100644 index 0b6ef10..0000000 --- a/.github/workflows/regression.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Regression - -# on: -# pull_request_review: -# types: [submitted] -# workflow_dispatch: - -on: - pull_request: - branches: - - main - workflow_dispatch: - -jobs: - Regression: - # if: (github.event.review.state == 'approved') && (github.event.pull_request.base.ref == 'main') - runs-on: ubuntu-latest - - container: - image: public.ecr.aws/certora/cvt-image:2024.10.23-4499-c4f8ad4 - - env: - ETHSCAN_API_KEY: ${{ secrets.ETHSCAN_API_KEY }} - QUORUM_PATH: "." - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} - - permissions: - id-token: write - contents: read - - steps: - - name: Checkout code - uses: actions/checkout@v4 - - - name: Install Quorum Repo - run: pip3.11 install . - - - name: Execute Regression Tests - run: | - pytest Quorum/tests --maxfail=1 --disable-warnings --tb=short - CheckProposal --config Quorum/execution.json - diff --git a/.github/workflows/update-version.yml b/.github/workflows/update-version.yml deleted file mode 100644 index 5bf601a..0000000 --- a/.github/workflows/update-version.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: Update-Version - -on: - pull_request: - branches: - - main - -jobs: - Update-Version: - runs-on: ubuntu-latest - permissions: - id-token: write - contents: write - actions: write - - steps: - - uses: actions/checkout@v4 - - - name: Change version - run: python3 -c "from datetime import datetime; print(datetime.now().strftime('%Y%m%d.%H%M%S.%f'))" > version - - - name: Configure Git - run: | - git config --global user.email "$GITHUB_ACTOR@users.noreply.github.com" - git config --global user.name "$GITHUB_ACTOR" - - - name: Commit and push version change - run: | - git add . - git commit -m "Auto change version." - git push -f \ No newline at end of file diff --git a/version b/version index 7d07d6f..aa0dbc0 100644 --- a/version +++ b/version @@ -1 +1 @@ -20241226.140038.770437 +20241226.144344.818531