diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..e588e1fb --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,55 @@ +name: tests + +on: + push: + branches: [ main ] + pull_request: + schedule: + - cron: '14 7 * * 0' # run once a week on Sunday + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + config: + # [Python version, tox env] + - ["2.7", "py27"] + - ["3.4", "py34"] + - ["3.5", "py35"] + - ["3.6", "py36"] + - ["3.7", "py37"] + - ["3.8", "py38"] + - ["3.9", "py39"] + - ["3.10", "py310"] + - ["pypy", "pypy"] + - ["pypy3", "pypy3"] + + runs-on: ubuntu-latest + name: ${{ matrix.config[1] }} + steps: + - uses: actions/checkout@v2 + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.config[0] }} + - name: Pip cache + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }} + restore-keys: | + ${{ runner.os }}-pip-${{ matrix.config[0] }}- + ${{ runner.os }}-pip- + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install tox + - name: Test + run: tox -e ${{ matrix.config[1] }} + - name: Coverage + run: | + pip install coveralls coverage-python-version + coveralls --service=github + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 5fa415d2..ed87c851 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,5 @@ parts/ pip-selfcheck.json src/icalendar.egg-info/ !.gitattributes +!.github !.gitignore diff --git a/CHANGES.rst b/CHANGES.rst index 036523a8..73e64314 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -15,7 +15,7 @@ New features: Bug fixes: -- *add item here* +- Test with GitHub Actions. [maurits] 4.0.9 (2021-10-16)