move test to ci job #12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Install Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Build Docker image | |
working-directory: ./app | |
run: | | |
docker buildx build \ | |
--platform linux/amd64,linux/arm64 \ | |
. | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Install poetry | |
run: pipx install poetry | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
- name: Checkout Repo | |
uses: actions/checkout@v4 | |
- name: Set up cache for Poetry dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pypoetry | |
key: poetry-${{ hashFiles('app/poetry.lock') }} | |
- name: Install Python dependencies with Poetry | |
working-directory: ./app | |
run: poetry install --no-interaction --no-root | |
- name: Run intercom test | |
working-directory: ./app | |
run: poetry run python test_intercom.py |