Skip to content

Commit

Permalink
Run tests on github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdeyen committed Jan 17, 2025
1 parent 3d60410 commit af47978
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 61 deletions.
61 changes: 0 additions & 61 deletions .circleci/config.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Lint

on: [pull_request]

concurrency:
group: lint-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

permissions:
contents: read

jobs:
ruby:
name: Check Ruby
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- name: Lint Ruby files
run: bundle exec rubocop -ESP
52 changes: 52 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Test

on:
push:
branches:
- main
pull_request:
schedule:
- cron: "0 0 * * 4" # every Thursday

concurrency:
group: lint-${{ github.ref_name }}
cancel-in-progress: ${{ github.ref_name != 'main' }}

permissions:
contents: read

jobs:
Rspec:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.1"
- "3.2"
- "3.3"
solidus:
- "v4.1"
- "v4.2"
- "v4.3"
- "v4.4"
database:
- "postgresql"
- "mysql"
- "sqlite"
env:
SOLIDUS_BRANCH: ${{ matrix.solidus }}
DB: ${{ matrix.database }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests for Solidus ${{ matrix.solidus }} on ${{ matrix.database }} with Ruby ${{ matrix.ruby-version }}
run: bundle exec rake
- name: Store test results
uses: actions/upload-artifact@v4
with:
path: test-results

0 comments on commit af47978

Please sign in to comment.