Skip to content

move everyuthing to a single file #118

move everyuthing to a single file

move everyuthing to a single file #118

Workflow file for this run

name: CI
on:
pull_request:
branches:
- "*"
push:
branches:
- main
- ga-mrsk
concurrency: ci-${{ github.ref }}
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler: default
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: StandardRB Check
run: bundle exec standardrb
- name: StandardJS Check
run: yarn standard
- name: erb-lint Check
run: bundle exec erblint --lint-all
test:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
steps:
- uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler: default
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18"
cache: yarn
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build assets
run: bin/vite build --clear --mode=test
- name: Prepare database
run: |
bin/rails db:create
bin/rails db:schema:load
- name: Run tests
run: |
bin/rails test
bin/rails test:system
# - name: Smoke test database seeds
# run: sudo bin/rails db:reset
deploy:
if: github.ref == 'refs/heads/ga-mrsk'
needs: [lint, test]
runs-on: ubuntu-latest
env:
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.0
bundler-cache: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install dependencies
run: gem install kamal
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
- name: Kamal deploy
env:
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
MEILI_MASTER_KEY: ${{ secrets.MEILI_MASTER_KEY }}
RUBYVIDEO_GITHUB_TOKEN: ${{ secrets.RUBYVIDEO_GITHUB_TOKEN }}
APPSIGNAL_PUSH_API_KEY: ${{ secrets.APPSIGNAL_PUSH_API_KEY }}
run: kamal deploy