From cf9c7ccc63bfbfc86e388190e3db967e5d8b1189 Mon Sep 17 00:00:00 2001 From: raizo07 Date: Wed, 2 Oct 2024 11:42:11 +0100 Subject: [PATCH 1/2] fix: Update github actions versions --- .github/workflows/checks.yml | 113 +++++++++-------------------------- 1 file changed, 29 insertions(+), 84 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 99d23a5b6..6e8c5cb72 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -34,7 +34,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python 3.12 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'poetry' @@ -75,7 +75,7 @@ jobs: - uses: actions/checkout@v4 - uses: asdf-vm/actions/setup@v3 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'pip' @@ -87,7 +87,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -124,7 +124,7 @@ jobs: poetry run poe compile_contracts v1 - name: Upload contracts artifacts - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: contract-artifacts path: starknet_py/tests/e2e/mock/ @@ -149,12 +149,12 @@ jobs: - uses: actions/checkout@v4 - name: Download contracts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: contract-artifacts path: starknet_py/tests/e2e/mock/ - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'pip' @@ -168,7 +168,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -241,7 +241,9 @@ jobs: poetry run coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} # ---------------------------------------------------------- # # ..................RUN-TESTS-ON-NETWORKS................... # @@ -261,12 +263,12 @@ jobs: - uses: actions/checkout@v4 - name: Download contracts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: contract-artifacts path: starknet_py/tests/e2e/mock/ - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'pip' @@ -280,7 +282,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python 3.12 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'poetry' @@ -309,7 +311,9 @@ jobs: poetry run coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} # ---------------------------------------------------------- # # ....................RUN-TESTS-WINDOWS..................... # @@ -333,12 +337,12 @@ jobs: toolchain: 1.79.0 # Doesn't work with "stable" - name: Download contracts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: contract-artifacts path: starknet_py/tests/e2e/mock/ - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'pip' @@ -367,7 +371,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -392,7 +396,9 @@ jobs: poetry run coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} # ---------------------------------------------------------- # # .....................RUN-DOCS-TESTS....................... # @@ -410,12 +416,12 @@ jobs: - uses: actions/checkout@v4 - name: Download contracts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: contract-artifacts path: starknet_py/tests/e2e/mock/ - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: "3.12" cache: 'pip' @@ -429,7 +435,7 @@ jobs: poetry config installer.modern-installation false - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} cache: 'poetry' @@ -455,7 +461,9 @@ jobs: poetry run coverage xml - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 + with: + token: ${{ secrets.CODECOV_TOKEN }} # ---------------------------------------------------------- # # .................RUN-DOCS-TESTS-WINDOWS................... # @@ -470,67 +478,4 @@ jobs: fail-fast: false matrix: python-version: [ "3.8", "3.12" ] - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@dc6353516c68da0f06325f42ad880f76a5e77ec9 - with: - toolchain: 1.79.0 # Doesn't work with "stable" - - - name: Download contracts - uses: actions/download-artifact@v3 - with: - name: contract-artifacts - path: starknet_py/tests/e2e/mock/ - - - uses: actions/setup-python@v4 - with: - python-version: "3.12" - cache: 'pip' - - # ====================== SETUP PYTHON ====================== # - - - name: Install poetry - run: | - python -m pip install --upgrade pip - pip install poetry - poetry config installer.modern-installation false - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: 'poetry' - - - name: Install dependencies - run: | - poetry install - - # ====================== SETUP DEVNET ====================== # - - - name: Cache devnet build - id: windows-devnet-cache - uses: actions/cache@v4 - with: - path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin - key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }} - - - name: Install devnet - if: steps.windows-devnet-cache.outputs.cache-hit != 'true' - run: | - $DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet" - cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR - shell: pwsh - - # ====================== RUN TESTS ====================== # - - - name: Run tests - run: | - poetry run poe test_ci_docs_v2 - poetry run poe test_ci_docs_v1 - - - name: Generate coverage in XML - run: | - poetry run coverage xml - - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + \ No newline at end of file From 263ad8b9de87b9a5311f3f69c995e1e2d4c7aa83 Mon Sep 17 00:00:00 2001 From: raizo07 Date: Wed, 2 Oct 2024 12:26:33 +0100 Subject: [PATCH 2/2] testing --- .github/workflows/checks.yml | 75 ++++++++++++++++++++++++++++++++++-- 1 file changed, 71 insertions(+), 4 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 6e8c5cb72..bafd28c53 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -465,9 +465,9 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} - # ---------------------------------------------------------- # - # .................RUN-DOCS-TESTS-WINDOWS................... # - # ---------------------------------------------------------- # + # ---------------------------------------------------------- # + # .................RUN-DOCS-TESTS-WINDOWS................... # + # ---------------------------------------------------------- # run-docs-tests-windows: if: ${{ github.event_name != 'pull_request' }} @@ -477,5 +477,72 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.12" ] + python-version: ["3.8", "3.12"] + steps: + - uses: actions/checkout@v4 + + - name: Setup Rust + uses: dtolnay/rust-toolchain@dc6353516c68da0f06325f42ad880f76a5e77ec9 + with: + toolchain: 1.79.0 # Doesn't work with "stable" + + - name: Download contracts + uses: actions/download-artifact@v3 + with: + name: contract-artifacts + path: starknet_py/tests/e2e/mock/ + + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + + # ====================== SETUP PYTHON ====================== # + + - name: Install poetry + run: | + python -m pip install --upgrade pip + pip install poetry + poetry config installer.modern-installation false + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + cache: 'poetry' + + - name: Install dependencies + run: | + poetry install + + # ====================== SETUP DEVNET ====================== # + + - name: Cache devnet build + id: windows-devnet-cache + uses: actions/cache@v4 + with: + path: ${{ github.workspace }}\starknet_py\tests\e2e\devnet\bin + key: ${{ runner.os }}-devnet-${{ env.DEVNET_SHA }} + + - name: Install devnet + if: steps.windows-devnet-cache.outputs.cache-hit != 'true' + run: | + $DEVNET_INSTALL_DIR = "${{ github.workspace }}\starknet_py\tests\e2e\devnet" + cargo install --git https://github.com/0xSpaceShard/starknet-devnet-rs.git --locked --rev ${{ env.DEVNET_SHA }} --root $DEVNET_INSTALL_DIR + shell: pwsh + + # ====================== RUN TESTS ====================== # + + - name: Run tests + run: | + poetry run poe test_ci_docs_v2 + poetry run poe test_ci_docs_v1 + + - name: Generate coverage in XML + run: | + poetry run coverage xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v3 \ No newline at end of file