From bb2dd725f4fb5218db5a5eff9f00424e2a8c3f35 Mon Sep 17 00:00:00 2001 From: baarkerlounger <5101747+baarkerlounger@users.noreply.github.com> Date: Tue, 8 Feb 2022 23:51:28 +0000 Subject: [PATCH] Create tests.yml --- .github/workflows/tests.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..1f82dc8 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,42 @@ +name: 'CI/CD Pipeline' + +on: + push: + branches: + - master + pull_request: + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + + test: + name: Test + runs-on: ubuntu-latest + + env: + RAILS_ENV: test + GEMFILE_RUBY_VERSION: 3.0.3 + + # Rails verifies the time zone in DB is the same as the time zone of the Rails app + TZ: "Europe/London" + + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.0.3 + # runs 'bundle install' and caches installed gems automatically + bundler-cache: true + + - name: Run tests + run: | + bundle exec rake spec +