diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e0762b02..e0229b00 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,20 +40,8 @@ jobs: - name: Run tests run: tox run -e unit - security-test: - name: Security tests - runs-on: ubuntu-22.04 - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Install tox - # TODO: Consider replacing with custom image on self-hosted runner OR pinning version - run: python3 -m pip install tox - - name: Run tests - run: tox run -e security - sync-docs: + if: ${{ github.event_name != 'pull_request' || startsWith(github.event.pull_request.head.repo.full_name, 'canonical/') }} uses: ./.github/workflows/sync_docs.yaml secrets: inherit permissions: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 50a1bfac..7b2d894f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,24 +8,12 @@ on: - main jobs: - lib-check: - name: Check libraries - runs-on: ubuntu-22.04 - timeout-minutes: 5 - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Check libs - uses: canonical/charming-actions/check-libraries@2.2.3 - with: - credentials: "${{ secrets.CHARMHUB_TOKEN }}" # FIXME: current token will expire in 2023-07-04 - github-token: "${{ secrets.GITHUB_TOKEN }}" + + build: + name: Build charm + uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v7 ci-tests: - needs: - - lib-check uses: ./.github/workflows/ci.yaml secrets: inherit permissions: @@ -33,14 +21,9 @@ jobs: pull-requests: write # Need to create PR actions: write - build: - name: Build charm - uses: canonical/data-platform-workflows/.github/workflows/build_charm_without_cache.yaml@v7 - release: name: Release to Charmhub needs: - - lib-check - ci-tests - build uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v7 diff --git a/tox.ini b/tox.ini index 74f0cdb2..51cb3a78 100644 --- a/tox.ini +++ b/tox.ini @@ -76,15 +76,6 @@ commands = poetry run coverage report poetry run coverage xml -[testenv:security] -description = Run security tests -commands = - poetry install --with security - poetry run bandit -r {[vars]src_path} - # uncomment the following line if this charm owns a lib - # bandit -r {[vars]lib_path} - poetry run safety check - [testenv:integration-{charm,provider,scaling,password-rotation,tls,upgrade,ha}] description = Run integration tests pass_env =