add fly toml #286
Workflow file for this run
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: "Lettuce Meet CI Workflow" | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build-api: | |
name: Build and Test Rails API | |
runs-on: ubuntu-latest | |
env: | |
api-dir: ./api | |
services: | |
postgres: | |
image: postgres:11.6 | |
ports: ["5432:5432"] | |
redis: | |
image: redis | |
ports: ["6379:6379"] | |
steps: | |
- uses: actions/checkout@v1 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1.2 | |
- name: Install PostgreSQL | |
run: sudo apt-get -yqq install libpq-dev | |
- name: Run bundle install | |
working-directory: ${{env.api-dir}} | |
run: | | |
gem install bundler | |
bundle install --jobs 4 --retry 3 | |
- name: Setup Database | |
working-directory: ${{env.api-dir}} | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: postgres | |
run: bin/rails db:create db:schema:load | |
- name: Build and test with rspec | |
working-directory: ${{env.api-dir}} | |
env: | |
RAILS_ENV: test | |
PGHOST: localhost | |
PGUSER: postgres | |
run: bundle exec rspec spec | |
build-frontend: | |
name: Build and Test Frontend | |
runs-on: ubuntu-latest | |
env: | |
api-dir: ./frontend | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build | |
with: | |
run: yarn install | |
start: yarn dev | |
component: true | |
auto-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: '0' | |
- name: Minor version for each merge | |
id: taggerDryRun | |
uses: anothrNick/github-tag-action@1.55.0 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
WITH_V: true | |
DRY_RUN: true | |
- name: echo new tag | |
run: | | |
echo "The next tag version will be: ${{ steps.taggerDryRun.outputs.new_tag }}" | |
- name: echo tag | |
run: | | |
echo "The current tag is: ${{ steps.taggerDryRun.outputs.tag }}" | |
- name: echo part | |
run: | | |
echo "The version increment was: ${{ steps.taggerDryRun.outputs.part }}" |