diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4ba680c0..b52da9ae 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,25 +11,17 @@ permissions: {} jobs: test: name: Test - runs-on: [self-hosted, management-ecr] - env: - LOGS_BUCKET_NAME: moj-analytics-s3-logs + runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Checkout - uses: actions/checkout@v2 + id: checkout + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - # permissions: - # contents: write - # id-token: write - # packages: write - # steps: - # - name: Checkout - # id: checkout - # uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - # - name: Set Up Container Structure Test - # id: setup_container_structure_test - # uses: ministryofjustice/github-actions/setup-container-structure-test@ccf9e3a4a828df1ec741f6c8e6ed9d0acaef3490 # v18.5.0 + # - name: Set Up Container Structure Test + # id: setup_container_structure_test + # uses: ministryofjustice/github-actions/setup-container-structure-test@ccf9e3a4a828df1ec741f6c8e6ed9d0acaef3490 # v18.5.0 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -44,13 +36,6 @@ jobs: sudo chmod +x /usr/local/bin/docker-compose docker-compose --version - - name: Configure AWS credentials - uses: aws-actions/configure-aws-credentials@v1 - with: - aws-region: eu-west-1 - role-to-assume: arn:aws:iam::593291632749:role/github-actions-management-ecr - role-duration-seconds: 1200 - - name: Build with Docker Compose id: build shell: bash @@ -66,7 +51,14 @@ jobs: registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-region: eu-west-1 + role-to-assume: arn:aws:iam::593291632749:role/github-actions-management-ecr + role-duration-seconds: 1200 + - name: Push id: push env: @@ -77,5 +69,6 @@ jobs: - name: Run tests env: IMAGE_TAG: ${{ github.sha }} + NETWORK: default run: | make test-python \ No newline at end of file