From 8e52f757776f53affbe55a6c7e846139b14f760f Mon Sep 17 00:00:00 2001 From: Khai Do Date: Mon, 22 Jan 2024 22:13:59 -0800 Subject: [PATCH] test ci --- .github/workflows/main.yaml | 304 ++++++++++++++++++------------------ 1 file changed, 152 insertions(+), 152 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index bc5dde9b3..000b1ed43 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -17,95 +17,95 @@ on: - '*' jobs: - linting: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - name: run pre-commit - run: poetry run pre-commit run --all-files --show-diff-on-failure - - packaging: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - name: build package - run: poetry build - - documentation: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - name: build documentation - run: poetry run make html --directory docs - - # use https://github.com/medmunds/tox-gh-matrix to export tox envlist to GH actions - get-tox-envlist: - runs-on: ubuntu-latest - outputs: - envlist: ${{ steps.generate-envlist.outputs.envlist }} - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - id: generate-envlist - run: poetry run tox --gh-matrix - - unit-tests: - needs: get-tox-envlist - runs-on: ubuntu-latest - strategy: - fail-fast: true - matrix: - tox: ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }} - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Setup Python - id: setup-python - uses: actions/setup-python@v5 - with: - python-version: ${{ matrix.tox.python.spec }} - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - name: run python tests - run: poetry run tox -e ${{ matrix.tox.name }} - - name: run python test report - run: poetry run tox -e report - - docker-build: - runs-on: ubuntu-latest - steps: - - name: Check out repository - uses: actions/checkout@v4 - - name: Build Docker Image - uses: docker/build-push-action@v5 - with: - context: . +# linting: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - name: run pre-commit +# run: poetry run pre-commit run --all-files --show-diff-on-failure +# +# packaging: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - name: build package +# run: poetry build +# +# documentation: +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - name: build documentation +# run: poetry run make html --directory docs +# +# # use https://github.com/medmunds/tox-gh-matrix to export tox envlist to GH actions +# get-tox-envlist: +# runs-on: ubuntu-latest +# outputs: +# envlist: ${{ steps.generate-envlist.outputs.envlist }} +# steps: +# - name: Check out repository +# uses: actions/checkout@v4 +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - id: generate-envlist +# run: poetry run tox --gh-matrix +# +# unit-tests: +# needs: get-tox-envlist +# runs-on: ubuntu-latest +# strategy: +# fail-fast: true +# matrix: +# tox: ${{ fromJSON(needs.get-tox-envlist.outputs.envlist) }} +# steps: +# - name: Check out repository +# uses: actions/checkout@v4 +# - name: Setup Python +# id: setup-python +# uses: actions/setup-python@v5 +# with: +# python-version: ${{ matrix.tox.python.spec }} +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - name: run python tests +# run: poetry run tox -e ${{ matrix.tox.name }} +# - name: run python test report +# run: poetry run tox -e report +# +# docker-build: +# runs-on: ubuntu-latest +# steps: +# - name: Check out repository +# uses: actions/checkout@v4 +# - name: Build Docker Image +# uses: docker/build-push-action@v5 +# with: +# context: . integration-tests: - needs: - - linting - - packaging - - documentation - - unit-tests - - docker-build +# needs: +# - linting +# - packaging +# - documentation +# - unit-tests +# - docker-build if: ${{ github.event_name == 'push' }} runs-on: ubuntu-latest permissions: @@ -133,71 +133,71 @@ jobs: role-session-name: GHA-${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ github.run_id }} role-duration-seconds: ${{ env.AWS_ROLE_DURATION }} - name: run tests - run: poetry run behave integration-tests/features --junit --junit-directory build/behave + run: poetry run behave integration-tests/features/stack-output-external-resolver.feature -n "launch a stack referencing the external output of an existing stack with region and profile" --junit --junit-directory build/behave env: AWS_DEFAULT_REGION: eu-west-1 - docker-build-push: - needs: - - integration-tests - if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/master') }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - # docker convention: edge tag refers to the very latest code - - name: Build and push Docker image to sceptreorg/sceptre:${{ steps.meta.outputs.tags }} - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: sceptreorg/sceptre:edge - labels: ${{ steps.meta.outputs.labels }} - - docker-build-release: - if: ${{ github.event_name == 'tag' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Log in to the Container registry - uses: docker/login-action@v3 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - # docker convention: latest tag refers to the last stable release - - name: Build and push Docker image to sceptreorg/sceptre:latest - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: sceptreorg/sceptre:latest - labels: ${{ steps.meta.outputs.labels }} - - name: Build and push Docker image to sceptreorg/sceptre:${{ steps.meta.outputs.tags }} - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: sceptreorg/sceptre:${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} - - pypi-release: - if: ${{ github.event_name == 'tag' }} - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - name: Install Poetry - uses: snok/install-poetry@v1 - - name: Install dependencies - run: poetry install --no-interaction --all-extras - - name: Publish to pypi - run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }} +# docker-build-push: +# needs: +# - integration-tests +# if: ${{ (github.event_name == 'push') && (github.ref == 'refs/heads/master') }} +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Log in to the Container registry +# uses: docker/login-action@v3 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} +# - name: Extract metadata (tags, labels) for Docker +# id: meta +# uses: docker/metadata-action@v5 +# # docker convention: edge tag refers to the very latest code +# - name: Build and push Docker image to sceptreorg/sceptre:${{ steps.meta.outputs.tags }} +# uses: docker/build-push-action@v5 +# with: +# context: . +# push: true +# tags: sceptreorg/sceptre:edge +# labels: ${{ steps.meta.outputs.labels }} +# +# docker-build-release: +# if: ${{ github.event_name == 'tag' }} +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Log in to the Container registry +# uses: docker/login-action@v3 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} +# - name: Extract metadata (tags, labels) for Docker +# id: meta +# uses: docker/metadata-action@v5 +# # docker convention: latest tag refers to the last stable release +# - name: Build and push Docker image to sceptreorg/sceptre:latest +# uses: docker/build-push-action@v5 +# with: +# context: . +# push: true +# tags: sceptreorg/sceptre:latest +# labels: ${{ steps.meta.outputs.labels }} +# - name: Build and push Docker image to sceptreorg/sceptre:${{ steps.meta.outputs.tags }} +# uses: docker/build-push-action@v5 +# with: +# context: . +# push: true +# tags: sceptreorg/sceptre:${{ steps.meta.outputs.tags }} +# labels: ${{ steps.meta.outputs.labels }} +# +# pypi-release: +# if: ${{ github.event_name == 'tag' }} +# runs-on: ubuntu-latest +# steps: +# - uses: actions/checkout@v4 +# - name: Install Poetry +# uses: snok/install-poetry@v1 +# - name: Install dependencies +# run: poetry install --no-interaction --all-extras +# - name: Publish to pypi +# run: poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}