diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 4ceda594..33de64c0 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -1,38 +1,23 @@ --- name: Automated tests - on: pull_request - jobs: - test25mysql: + build: runs-on: ubuntu-latest + strategy: + matrix: + ruby: ["2.5", "2.6", "2.7"] + db: [sqlite, mysql, postgres] + exclude: + - ruby: "2.5" + db: sqlite + - ruby: "2.5" + db: postgres + - ruby: "2.6" + db: sqlite + - ruby: "2.6" + db: postgres + steps: - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.5 mysql - - test26mysql: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.6 mysql - - test27mysql: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.7 mysql - - test27postgres: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.7 postgres - - test27sqlite: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - run: bash -x script/cibuild 2.7 sqlite - -# - run: bash -x script/cibuild 2.5 postgres -# - run: bash -x script/cibuild 2.7 postgres + - run: bash -x script/cibuild ${{ matrix.ruby }} ${{ matrix.db }} diff --git a/test/models/recurring_todo_test.rb b/test/models/recurring_todo_test.rb index 3e13da8b..e6535f14 100644 --- a/test/models/recurring_todo_test.rb +++ b/test/models/recurring_todo_test.rb @@ -156,10 +156,10 @@ class RecurringTodoTest < ActiveSupport::TestCase ## Test: every year # start from after june 8th 2008 - @yearly.start_from = Time.zone.local(2020,6,12) - assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(nil) # jun 8th next year - assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(Time.zone.local(2019,6,1)) # also next year - assert_equal Time.zone.local(2021,6,8), @yearly.get_due_date(Time.zone.local(2020,6,15)) # also next year + @yearly.start_from = Time.zone.local(2021,6,12) + assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(nil) # jun 8th next year + assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(Time.zone.local(2019,6,1)) # also next year + assert_equal Time.zone.local(2022,6,8), @yearly.get_due_date(Time.zone.local(2020,6,15)) # also next year this_year = Time.zone.now.utc.year @yearly.start_from = Time.zone.local(this_year+1,6,12)