Skip to content

Commit

Permalink
Add semaphore configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
coorasse committed Nov 26, 2024
1 parent 6a29f3f commit 154d610
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .semaphore/main-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: v1.0
name: main-deploy
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004

blocks:
- name: main-deploy
task:
secrets:
- name: rubygems-deploy
jobs:
- name: main-deploy
commands:
- checkout --use-cache
- gem build moirai
- gem push moirai-*.gem
51 changes: 51 additions & 0 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
version: "v1.0"
name: moirai
agent:
machine:
type: e1-standard-2
os_image: ubuntu2004
auto_cancel:
running:
when: "true"

blocks:
- name: tests
execution_time_limit:
minutes: 10
task:
secrets:
- name: moirai
prologue:
commands:
- checkout --use-cache
- cache restore
- bundle config set path 'vendor/bundle'
- bundle install -j 4

- cache store
jobs:
- name: linter
commands:
- bundle exec standardrb
- name: tests sqlite
env_vars:
- name: TARGET_DB
value: sqlite
- name: RAILS_ENV
value: test
commands:
- bin/rails db:create db:schema:load
- bin/check
- name: tests postgres
env_vars:
- name: TARGET_DB
value: postgres
- name: RAILS_ENV
value: test
commands:
- sem-service start postgres 14
- bin/rails db:create db:schema:load
- bin/check
promotions:
- name: main
pipeline_file: main-deploy.yml

0 comments on commit 154d610

Please sign in to comment.