-
Notifications
You must be signed in to change notification settings - Fork 58
51 lines (41 loc) · 1.28 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
---
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'