Skip to content

Merge pull request #197 from Mark-Simulacrum/sleep-before-fetch #171

Merge pull request #197 from Mark-Simulacrum/sleep-before-fetch

Merge pull request #197 from Mark-Simulacrum/sleep-before-fetch #171

Workflow file for this run

---
name: CI/CD
on:
push:
branches:
- master
pull_request: {}
env:
PYTHON_VERSION: 3.8
jobs:
cicd:
name: Test and deploy
runs-on: ubuntu-latest
steps:
- name: Clone the source code
uses: actions/checkout@v2
- name: Setup Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install flake8
run: pip install flake8
- name: Ensure the code passes lints
run: flake8 homu/
- name: Install homu on the builder
run: pip install -e .
- name: Run the test suite
run: python3 setup.py test
- name: Build the Docker image
run: docker build -t homu .
- name: Upload the Docker image to AWS ECR
uses: rust-lang/simpleinfra/github-actions/upload-docker-image@master
with:
image: homu
repository: bors
region: us-west-1
redeploy_ecs_cluster: rust-ecs-prod
redeploy_ecs_service: bors
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' && github.repository == 'rust-lang/homu' && github.ref == 'refs/heads/master'