ci: use poetry for molecule
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
deleted file mode 100644
index 251c443..0000000
--- a/.github/workflows/integration.yml
+++ /dev/null
@@ -1,65 +0,0 @@
-name: integration
-
-concurrency:
- group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
- cancel-in-progress: true
-
-on:
- pull_request:
- types:
- - opened
- - synchronize
- - reopened
- paths:
- - .github/workflows/integration.yml
- - atmosphere/**
- - molecule/**
- - playbooks/**
- - plugins/**
- - roles/**
- push:
- branches:
- - main
- paths:
- - .github/workflows/integration.yml
- - atmosphere/**
- - molecule/**
- - playbooks/**
- - plugins/**
- - roles/**
-
-jobs:
- molecule:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout project
- uses: actions/checkout@v3.1.0
-
- - name: Set up Go
- uses: actions/setup-go@v3.3.1
- 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 }}
-
- - uses: gofrolist/molecule-action@v2.3.3
- 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 }}
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 }}