Merge pull request #2628 from TracksApp/simplify-workflow-file

Simplify the workflow file
This commit is contained in:
Jyri-Petteri Paloposki 2021-08-09 10:40:51 +03:00 committed by GitHub
commit 2790bb9b1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 35 deletions

View file

@ -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 }}

View file

@ -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)