-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (32 loc) · 1.28 KB
/
build_n_test.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
name: Build & Test
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
env:
APP_IMAGE: keboola-component
KBC_DEVELOPERPORTAL_USERNAME: ${{ secrets.KBC_DEVELOPERPORTAL_USERNAME }}
KBC_DEVELOPERPORTAL_PASSWORD: ${{ secrets.KBC_DEVELOPERPORTAL_PASSWORD }}
KBC_DEVELOPERPORTAL_VENDOR: ${{ secrets.KBC_DEVELOPERPORTAL_VENDOR }}
KBC_DEVELOPERPORTAL_APP: ${{ secrets.KBC_DEVELOPERPORTAL_APP }}
steps:
- uses: actions/checkout@v2
- name: Build image
run: docker build . --tag=$APP_IMAGE
- name: Run Flake Lint
run: docker run $APP_IMAGE flake8 /code/ --config=/code/flake8.cfg
- name: Unit Test
run: docker run $APP_IMAGE python -m unittest discover
- name: Set tag env
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
# Push test tag, uncomment to enable
# - name: Push test image
# uses: odinuv/action-push-to-ecr@master
# with:
# vendor: ${{ secrets.KBC_DEVELOPERPORTAL_VENDOR }}
# app_id: ${{ secrets.KBC_DEVELOPERPORTAL_APP }}
# username: ${{ secrets.KBC_DEVELOPERPORTAL_USERNAME }}
# password: ${{ secrets.KBC_DEVELOPERPORTAL_PASSWORD }}
# tag: test
# push_latest: true
# source_image: keboola-component