diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml new file mode 100644 index 00000000..d15e2715 --- /dev/null +++ b/.github/workflows/continuous_integration.yml @@ -0,0 +1,45 @@ +name: Validate Project + +# on: +# push: +# branches-ignore: +# - main + +on: [push] + +jobs: + ci_validation: + runs-on: ubuntu-latest + + services: + mongo: + image: mongo:6.0.14 + ports: + - 27017:27017 + env: + # MONGO_INITDB_ROOT_USERNAME: test + # MONGO_INITDB_ROOT_PASSWORD: password + MONGO_INITDB_DATABASE: steam_test_1_8_x + options: >- + --health-cmd "echo 'db.runCommand("ping").ok' | mongosh --quiet" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + --name mongo_container + + steps: + - name: Checkout Repository + uses: actions/checkout@v3 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 3.1.4 + bundler-cache: true + cache-version: 1 + + - name: Prepare the DB + run: bundle exec rake mongodb:test:seed + + - name: Test + run: bundle exec rspec \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 133efc32..00000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: ruby -services: mongodb -before_script: ./script/ci/before_build.sh -rvm: - - 2.7.7 - - 3.0.5 - - 3.1.3 -addons: - code_climate: - repo_token: 3fa74f2ade25037fccd7261090acbdeae232639c3a83aafb80ee428ec16b8cf9 diff --git a/MIT-LICENSE b/MIT-LICENSE index 6e829705..a9545bda 100644 --- a/MIT-LICENSE +++ b/MIT-LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2023 NoCoffee +Copyright (c) 2010-2024 NoCoffee Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/README.md b/README.md index 43044038..2df0ca79 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Steam -[![Code Climate](https://codeclimate.com/github/locomotivecms/steam/badges/gpa.svg)](https://codeclimate.com/github/locomotivecms/steam) [![Build Status](https://travis-ci.com/locomotivecms/steam.svg?branch=master)](https://travis-ci.com/locomotivecms/steam) [![Coverage Status](https://coveralls.io/repos/locomotivecms/steam/badge.svg?branch=master)](https://coveralls.io/r/locomotivecms/steam?branch=master) [![Gitter](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-brightgreen.svg)](https://gitter.im/locomotivecms/steam) - The rendering stack used by both Wagon and Engine. It includes: - the rack stack to pages and already precompiled assets (through webpack, vite or other). @@ -103,4 +101,4 @@ Note: you do not need to prefix with bundle exec as the docky-ruby image already ## License -Copyright (c) 2023 NoCoffee. MIT Licensed, see MIT-LICENSE for details. +Copyright (c) 2010-2024 NoCoffee. MIT Licensed, see MIT-LICENSE for details. diff --git a/Rakefile b/Rakefile index e24e287c..2e215e8b 100755 --- a/Rakefile +++ b/Rakefile @@ -27,8 +27,8 @@ namespace :mongodb do `mv #{dump_path} #{db_path}` end - `mongo steam_test_1_7_x --eval "db.dropDatabase()" #{host}` - `mongorestore -d steam_test_1_7_x #{db_path} #{host}` + `mongo steam_test_1_8_x --eval "db.dropDatabase()" #{host}` + `mongorestore -d steam_test_1_8_x #{db_path} #{host}` puts "Done! Update now the spec/support/helpers.rb file by setting the new id of the site returned by the mongodb_site_id method" end diff --git a/script/ci/before_build.sh b/script/ci/before_build.sh deleted file mode 100755 index 313a4c26..00000000 --- a/script/ci/before_build.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh -echo 'America/Chicago' | sudo tee /etc/timezone -sudo dpkg-reconfigure --frontend noninteractive tzdata -date -mongo --version diff --git a/spec/support/helpers.rb b/spec/support/helpers.rb index b863ec8a..25aa6cc3 100644 --- a/spec/support/helpers.rb +++ b/spec/support/helpers.rb @@ -4,7 +4,7 @@ module Spec module Helpers def mongodb_database - 'steam_test_1_7_x' + 'steam_test_1_8_x' end def mongodb_site_id