Skip to content

refactor workflows to allow migration from ecr to ghcr and onto gihthub hosted runner #58

refactor workflows to allow migration from ecr to ghcr and onto gihthub hosted runner

refactor workflows to allow migration from ecr to ghcr and onto gihthub hosted runner #58

Workflow file for this run

name: Run tests
on:
pull_request:
branches:
- main
permissions: {}
jobs:
test:
runs-on: ubuntu-latest
env:
LOGS_BUCKET_NAME: moj-analytics-s3-logs
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Docker Compose
id: docker-compose
shell: bash
env:
IMAGE_TAG: ${{ github.sha }}
run: |
sudo curl -L "https://github.com/docker/compose/releases/download/v2.21.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
docker-compose --version
- name: Set up Docker Context for Buildx
id: buildx-context
run: docker context use builders || docker context create builders
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
version: latest
endpoint: builders
- name: Build image
run: make build
env:
NETWORK: host
- name: Run Python tests (docker-compose)
run: make clean && make test
env:
NETWORK: default