fixed a couple things #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Fruity Flask Application for Alluvial.Finance | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Set up python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependancies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
pip install -r requirements.txt | |
- name: Run unit tests | |
run: | | |
pytest | |
- name: Static Code analysis | |
run: | | |
pip install flake8 | |
flake8 . --exclude=venv* --statistics | |
- name: Helm linting | |
run: | | |
cd Kubernetes | |
helm lint | |
- name: Login to github container registry | |
run: echo "${{ secrets.GH_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Build container and push | |
run: | | |
docker build -t ghcr.io/${{ github.repository }}:latest . | |
docker push ghcr.io/${{ github.repository }}:latest | |
- name: Setup helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: "v3.5.2" | |
- name: Login to github | |
env: | |
HELM_EXPERIMENTAL_OCI: 1 | |
run: | | |
echo "${{ secrets.GH_PAT }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin | |
- name: Package and push chart | |
env: | |
HELM_EXPERIMENTAL_OCI: 1 | |
run: | | |
cd Kubernetes | |
helm chart save . ghcr.io/${{ github.repository }}/flask-hello-world:latest | |
helm chart push ghcr.io/${{ github.repository }}/flask-hello-world:latest |