install docker-compose in ci #6
Workflow file for this run
This file contains 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: "CI" | |
on: # yamllint disable-line rule:truthy rule:comments | |
push: | |
branches: | |
- "main" | |
- "develop" | |
tags: | |
- "v*" | |
pull_request: ~ | |
concurrency: # Cancel any existing runs of this workflow for this same PR | |
group: "${{ github.workflow }}-${{ github.ref }}" | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
NAUTOBOT_VER: "2.3.1" | |
PYTHON_VER: "3.11" | |
steps: | |
- name: "Get go-nautobot code" | |
uses: actions/checkout@v3 | |
- name: "Set up Docker Compose" | |
run: | | |
curl -L "https://github.com/docker/compose/releases/download/v2.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
chmod +x /usr/local/bin/docker-compose | |
- name: "Run tests" | |
run: | | |
cd development | |
docker-compose --project-name go_nautobot -f docker-compose.yml up --build --abort-on-container-exit --exit-code-from oapi | |
env: | |
NAUTOBOT_URL: "http://nautobot:8080/api/" | |
NAUTOBOT_TOKEN: "0123456789abcdef0123456789abcdef01234567" | |
- name: "Tear down Nautobot" | |
run: "docker-compose --project-name go_nautobot -f development/docker-compose.yml down -v" | |
if: always() |