-
Notifications
You must be signed in to change notification settings - Fork 7
73 lines (61 loc) · 2.13 KB
/
version_push.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Test
# Triggers
on:
push:
branches-ignore:
- 'docs*'
- 'no_build*'
- master
# Specify what jobs to run
jobs:
TestBuildDeploy:
name: Test, Lint, Build and Deploy
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: us-east-1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.6
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Install Poetry
uses: dschep/install-poetry-action@db2e37f48d1b1cd1491c4590338ebc7699adb425
- name: Install Dependencies
run: poetry install
- name: Linting with Black
run: poetry run black lambda_cache --check
- name: Testing with Pytest
working-directory: ./tests
run: poetry run pytest . --cov ../lambda_cache --cov-report term-missing --ignore=./integration_tests/ -vv
# Only runs on release branch
- name: Integration Test
if: github.ref == 'refs/heads/release'
working-directory: ./tests/integration_tests
run: poetry run pytest -vv
- name: Update Test Coverage
if: github.ref == 'refs/heads/release' # only on the feature branch do we publish code coverage stats
working-directory: ./tests
run: poetry run coveralls
# Success / Failure, publish to Slack
- name: Notify slack success
if: success()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@51259479e07a6e3c44b826b39b771be8106142ba
with:
channel: lambda-cache
status: SUCCESS
color: good
- name: Notify slack fail
if: failure()
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
uses: voxmedia/github-action-slack-notify-build@51259479e07a6e3c44b826b39b771be8106142ba
with:
channel: lambda-cache
status: FAILED
color: danger