diff --git a/.github/workflows/coverage-build.yaml b/.github/workflows/coverage-build.yaml index 980f2d0..b94a498 100644 --- a/.github/workflows/coverage-build.yaml +++ b/.github/workflows/coverage-build.yaml @@ -10,32 +10,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: ./.github/workflows/build-providers.yaml + - uses: actions/cache/restore@v3 + id: cache + with: + path: build/random/dist/CallyProvidersRandom-3.6.0.tar.gz + key: cally-provider-random-3.6.0 - name: Setup Python uses: actions/setup-python@v5 with: python-version: "3.11" cache: pip - - name: Install Cally test dependencies - run: pip install .[test] - - name: Restore Provider Packages - id: cache-providers - uses: actions/cache@v4 - with: - path: build/random/dist/CallyProvidersRandom-3.6.0.tar.gz - key: cally-provider-random-3.6.0 - - uses: actions/setup-node@v4 - if: steps.cache-providers.outputs.cache-hit != 'true' - with: - node-version: "20" - - name: Install cdktf-cli and build - if: steps.cache-providers.outputs.cache-hit != 'true' - run: | - npm install cdktf-cli - echo "$(pwd)/node_modules/.bin/" >> $GITHUB_PATH - cally provider build --provider random --version 3.6.0 - (cd build/random && python -m build) - name: Install Provider Pacakge run: pip install build/random/dist/CallyProvidersRandom-3.6.0.tar.gz + - name: Install Cally test dependencies + run: pip install .[test] - name: Run Coverage run: | coverage run -m pytest diff --git a/.github/workflows/test-cally.yaml b/.github/workflows/test-cally.yaml index 479ff99..b517268 100644 --- a/.github/workflows/test-cally.yaml +++ b/.github/workflows/test-cally.yaml @@ -12,9 +12,16 @@ jobs: matrix: python: ["3.11"] steps: + # Restore Provider Packages - uses: actions/checkout@v4 + - uses: ./.github/workflows/build-providers.yaml + - uses: actions/cache/restore@v3 + id: cache + with: + path: build/random/dist/CallyProvidersRandom-3.6.0.tar.gz + key: cally-provider-random-3.6.0 - # Cally Testing + # Cally Install - name: Setup Python uses: actions/setup-python@v5 with: @@ -22,25 +29,6 @@ jobs: cache: pip - name: Install Cally test dependencies run: pip install .[test] - - # Provider Packages - - name: Restore Provider Packages - id: cache-providers - uses: actions/cache@v4 - with: - path: build/random/dist/CallyProvidersRandom-3.6.0.tar.gz - key: cally-provider-random-3.6.0 - - uses: actions/setup-node@v4 - if: steps.cache-providers.outputs.cache-hit != 'true' - with: - node-version: "20" - - name: Install cdktf-cli and build - if: steps.cache-providers.outputs.cache-hit != 'true' - run: | - npm install cdktf-cli - echo "$(pwd)/node_modules/.bin/" >> $GITHUB_PATH - cally provider build --provider random --version 3.6.0 - (cd build/random && python -m build) - name: Install Provider Pacakge run: pip install build/random/dist/CallyProvidersRandom-3.6.0.tar.gz