From 878097048e73438733f23643a0d4a18effa148f5 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Thu, 25 Jul 2024 18:26:56 +0300 Subject: [PATCH] Add test workflow (GitHub Actions) --- .github/workflows/test.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000000..68dcd66a080 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,37 @@ +name: Run tests +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + js_tests: + name: 'Node.js ${{ matrix.node-version }} tests' + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm test + + rspec_tests: + name: 'Ruby ${{ matrix.ruby-version }} tests' + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: [3.3.3] + steps: + - uses: actions/checkout@v4 + - name: Use Ruby ${{ matrix.ruby-version }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + - run: gem install bundler + - run: bundle install + - run: RAILS_ENV=test bundle exec rspec