Skip to content

Fix typo in licenses.md #413

Fix typo in licenses.md

Fix typo in licenses.md #413

Workflow file for this run

name: CI/CD
on:
pull_request:
branches:
- "main"
- "dev"
push:
branches:
- "main"
- "dev"
jobs:
test_frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./web
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: yarn
- name: Test
run: yarn run test
env:
CI: true
test_functions:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Install dependencies
run: pip install -r requirements.txt -r requirements-dev.txt
- name: Test
run: python -m pytest
working-directory: backend
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: pre-commit/action@v2.0.3
build-and-deploy-web-app:
runs-on: ubuntu-latest
needs: test_frontend
if: github.ref == 'refs/heads/main'
defaults:
run:
working-directory: ./web
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Install
run: yarn
- name: Build
run: yarn run build
env:
API_KEY_NLS: ${{ secrets.API_KEY_NLS }}
TILESERVER_URL: ${{ secrets.TILESERVER_URL }}
CITIES: "'Kangasala','Lempäälä','Nokia','Orivesi','Pirkkala','Tampere','Vesilahti','Ylöjärvi'"
- name: Deploy app build to S3 bucket
run: aws s3 sync ./dist/ s3://${{ secrets.AWS_BUCKET_NAME }} --delete
build-and-deploy-lambda-functions:
runs-on: ubuntu-latest
needs: test_functions
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.8"
- name: Build zip files for lambda
run: make build-lambda
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_LAMBDA_UPLOAD_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_LAMBDA_UPLOAD_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Update lambda functions
run: make update-lambda -C infra
- name: Update database
run: make migrate-db -C infra