Retry in macro cluster in another way #3570
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: CI | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
jobs: | |
rspec: | |
env: | |
RAILS_ENV: test | |
PGUSER: test | |
PGHOST: localhost | |
PGPORT: 5432 | |
DATABASE_URL: postgres://test@localhost/fountainpencompanion_test | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:16 | |
env: | |
POSTGRES_USER: test | |
POSTGRES_DB: fountainpencompanion_test | |
POSTGRES_HOST_AUTH_METHOD: trust | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/[email protected] | |
- name: Install correct Node version | |
uses: actions/[email protected] | |
with: | |
node-version: "v20.18.0" | |
cache: yarn | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Install JS dependencies | |
run: yarn install | |
- name: Run tests | |
run: bundle exec rake | |
- name: Report to CodeCov | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: ruby | |
token: ${{ secrets.CODECOV_TOKEN }} | |
jest: | |
runs-on: ubuntu-latest | |
env: | |
PRETTIER_RUBY_TIMEOUT_MS: 50000 | |
steps: | |
- uses: actions/[email protected] | |
- name: Install correct Node version | |
uses: actions/[email protected] | |
with: | |
node-version: "v20.18.0" | |
cache: yarn | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Install JS dependencies | |
run: yarn install | |
- name: Run lint | |
run: yarn lint | |
- name: Run tests | |
run: yarn jest | |
- name: Report to CodeCov | |
uses: codecov/codecov-action@v5 | |
with: | |
flags: javascript | |
token: ${{ secrets.CODECOV_TOKEN }} | |
docker-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/[email protected] | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: Dockerfile | |
push: false | |
target: prod | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
deploy: | |
name: Deploy app | |
needs: [rspec, jest] | |
if: github.ref_name == 'master' | |
runs-on: ubuntu-latest | |
concurrency: deploy-group # optional: ensure only one action runs at a time | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: superfly/flyctl-actions/setup-flyctl@master | |
- run: flyctl deploy --remote-only | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} |