fix(eventbrite): continue syncing in face of errors #829
This file contains hidden or 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: Build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| 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 utf8mb4 COLLATE utf8mb4_unicode_ci;" | |
| mysql -h127.0.0.1 -P3306 -uroot -proot -e "CREATE DATABASE adb_test_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_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 | |
| dockerfile: Dockerfile.frontend-v2 | |
| tags: latest,${{ github.sha }} |