Skip to content

Combine events from North Bay and Bay Area when fetching Facebook events and upgrade Go version #575

Combine events from North Bay and Bay Area when fetching Facebook events and upgrade Go version

Combine events from North Bay and Bay Area when fetching Facebook events and upgrade Go version #575

Workflow file for this run

name: Build
on:
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: actions/setup-go@v3
with:
go-version: ^1.15.0
- name: Version check
run: |
node --version
npm --version
go version
- name: Install deps
run: |
cd ./frontend
npm ci --legacy-peer-deps
cd ../server/src
go mod download
- name: Start database
run: |
sudo /etc/init.d/mysql start
mysql -h127.0.0.1 -P3306 -uroot -proot -e "CREATE USER adb_user@localhost IDENTIFIED BY 'adbpassword';"
mysql -h127.0.0.1 -P3306 -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* to adb_user@localhost;"
mysql -h127.0.0.1 -P3306 -uroot -proot -e "CREATE DATABASE adb_db CHARACTER SET utf8 COLLATE utf8_general_ci;"
mysql -h127.0.0.1 -P3306 -uroot -proot -e "CREATE DATABASE adb_test_db CHARACTER SET utf8 COLLATE utf8_general_ci;"
- name: Set environment variables for tests
run: echo "DB_PROTOCOL=tcp(127.0.0.1:3306)" >> $GITHUB_ENV
- name: Run tests
run: |
./hooks/pre-commit
cd ./server/src
go test github.com/dxe/adb/...
- name: Deploy image to ECR (main)
if: ${{ github.event_name == 'push' }} # don't deploy branches
uses: kciter/aws-ecr-action@master
with:
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
repo: dxe/adb
region: us-west-2
tags: latest,${{ github.sha }}
- name: Deploy image to ECR (next.js)
if: ${{ github.event_name == 'push' }} # don't deploy branches
uses: kciter/aws-ecr-action@master
with:
access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
account_id: ${{ secrets.AWS_ACCOUNT_ID }}
repo: dxe/adb-next
region: us-west-2
path: frontend-v2
dockerfile: frontend-v2/Dockerfile
tags: latest,${{ github.sha }}