From 87b5350f1f47ee043baf7128cf3b8feaf9578568 Mon Sep 17 00:00:00 2001 From: Andrew Tomaka Date: Wed, 20 Mar 2024 18:50:43 -0400 Subject: [PATCH] Try out gitea actions --- .drone.yml | 86 -------------------------------------- .gitea/workflows/test.yaml | 25 +++++++++++ 2 files changed, 25 insertions(+), 86 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/test.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 34389c8..0000000 --- a/.drone.yml +++ /dev/null @@ -1,86 +0,0 @@ -name: default -kind: pipeline - -steps: -- name: install - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/bundle install --jobs=3 --retry=3 - -- name: autoload - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/rails zeitwerk:check - depends_on: - - install - -- name: lint - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/bundle exec standardrb - depends_on: - - install - -- name: test - image: ruby:3.2.0 - volumes: - - name: bundle - path: /usr/local/bundle - commands: - - bin/rails assets:precompile - - bin/rails test - depends_on: - - install - -volumes: -- name: bundle - temp: {} - -trigger: - branch: - exclude: master - event: push - ---- -name: deploy -kind: pipeline - -steps: - - name: docker-build - image: plugins/docker - environment: - SECRET_KEY_BASE: - from_secret: secret_key_base - RAILS_MASTER_KEY: - from_secret: rails_master_key - settings: - pull_image: true - registry: docker.atomaka.com - repo: docker.atomaka.com/budget - tags: - - latest - - ${DRONE_TAG} - - name: deploy - image: appleboy/drone-ssh - settings: - host: - from_secret: unraid_host - username: - from_secret: unraid_username - key: - from_secret: unraid_ssh_key - script: - - docker pull docker.atomaka.com/budget:latest - - docker restart budget - -trigger: - event: tag diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml new file mode 100644 index 0000000..ad72a7b --- /dev/null +++ b/.gitea/workflows/test.yaml @@ -0,0 +1,25 @@ +name: Ruby CI + +on: + pull_request: + +jobs: + test: + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby 3.2.0 + uses: ruby/setup-ruby + with: + ruby-version: 3.2.0 + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec rake + - name: autoload + run: bin/rails zeitwerk:check + - name: lint + run: bin/bundle exec standardrb + - name: test + run: | + bin/rails assets:precompile + bin/rails test