ci: use poetry for molecule
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 20f1dfd..7f7d6f0 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -73,3 +73,53 @@
- name: Run test suite
run: poetry run pytest atmosphere/tests/${{ matrix.type }}
+
+ molecule:
+ runs-on: ubuntu-latest
+ needs:
+ - pre-commit
+ - pytest
+ steps:
+ - name: Checkout project
+ uses: actions/checkout@v3.1.0
+
+ - name: Install Poetry
+ run: pipx install poetry
+
+ - name: Setup Python
+ uses: actions/setup-python@v4.2.0
+ with:
+ cache: poetry
+
+ - name: Install dependencies
+ run: poetry install --no-interaction
+
+ # TODO(mnaser): Move this out to "cleanup" stage
+ - name: Set up Go
+ uses: actions/setup-go@v3.3.0
+ with:
+ go-version-file: go.mod
+ cache: true
+ - name: Clean-up stale stacks
+ run: go run ./cmd/atmosphere-ci molecule cleanup
+ env:
+ OS_AUTH_URL: https://auth.vexxhost.net/v3
+ OS_REGION_NAME: ca-ymq-1
+ OS_USER_DOMAIN_NAME: Default
+ OS_USERNAME: ${{ secrets.OS_USERNAME }}
+ OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
+ OS_PROJECT_DOMAIN_NAME: Default
+ OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}
+
+ - name: Run Molecule
+ run: poetry run molecule test
+ timeout-minutes: 90
+ env:
+ ATMOSPHERE_STACK_NAME: "atmosphere-${{ github.run_id }}-${{ github.run_attempt }}"
+ OS_AUTH_URL: https://auth.vexxhost.net/v3
+ OS_REGION_NAME: ca-ymq-1
+ OS_USER_DOMAIN_NAME: Default
+ OS_USERNAME: ${{ secrets.OS_USERNAME }}
+ OS_PASSWORD: ${{ secrets.OS_PASSWORD }}
+ OS_PROJECT_DOMAIN_NAME: Default
+ OS_PROJECT_NAME: ${{ secrets.OS_PROJECT_NAME }}