Merge pull request #160 from stijndcl/fix-ci

Fix CI
pull/162/head
Stijn De Clercq 2023-01-11 23:43:28 +01:00 committed by GitHub
commit ad0076537d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 15 deletions

View File

@ -5,15 +5,15 @@ on:
jobs: jobs:
dependencies: dependencies:
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: '3.9.5' python-version: '3.9.5'
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
@ -23,7 +23,7 @@ jobs:
run: pip3 install -r requirements.txt -r requirements-dev.txt run: pip3 install -r requirements.txt -r requirements-dev.txt
tests: tests:
needs: [dependencies] needs: [dependencies]
runs-on: ubuntu-latest runs-on: ubuntu-20.04
services: services:
postgres: postgres:
image: postgres:14 image: postgres:14
@ -41,11 +41,11 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: '3.9.5' python-version: '3.9.5'
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
@ -63,15 +63,15 @@ jobs:
token: ${{ secrets.CODECOV }} token: ${{ secrets.CODECOV }}
linting: linting:
needs: [tests] needs: [tests]
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: '3.9.5' python-version: '3.9.5'
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
@ -83,15 +83,15 @@ jobs:
run: flake8 run: flake8
typing: typing:
needs: [tests] needs: [tests]
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: '3.9.5' python-version: '3.9.5'
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
@ -103,15 +103,15 @@ jobs:
run: mypy run: mypy
formatting: formatting:
needs: [tests] needs: [tests]
runs-on: ubuntu-latest runs-on: ubuntu-20.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Setup Python - name: Setup Python
uses: actions/setup-python@v2 uses: actions/setup-python@v4
with: with:
python-version: '3.9.5' python-version: '3.9.5'
- name: Cache dependencies - name: Cache dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }} key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}

View File

@ -28,6 +28,7 @@ def test_parse_dm_string_dm_garbage():
parse_dm_string("AC/DC") parse_dm_string("AC/DC")
@freeze_time("2022-09-11")
def test_parse_dm_string_semantic(): def test_parse_dm_string_semantic():
"""Test parsing date strings in the [DAY] [MONTH] and [MONTH] [DAY] formats""" """Test parsing date strings in the [DAY] [MONTH] and [MONTH] [DAY] formats"""
result = parse_dm_string("23rd november") result = parse_dm_string("23rd november")