repo2docker/.github/workflows/test.yml

95 wiersze
2.4 KiB
YAML
Czysty Zwykły widok Historia

2022-10-08 11:28:21 +00:00
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
2020-08-11 08:13:48 +00:00
#
2022-10-08 11:28:21 +00:00
name: Test
2020-08-11 08:13:48 +00:00
on:
pull_request:
2022-10-08 11:28:21 +00:00
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
push:
paths-ignore:
- "docs/**"
- "**.md"
- "**.rst"
- ".github/workflows/*"
- "!.github/workflows/test.yml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags:
- "**"
schedule:
2022-10-08 11:28:21 +00:00
# Run weekly test so we know if tests break for external reasons
# https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#scheduled-events
#
# At 10:36 on Sunday (https://crontab.guru)
- cron: '36 10 * * 0'
2022-10-08 11:28:21 +00:00
workflow_dispatch:
2020-08-11 08:13:48 +00:00
# Global environment variables
2020-08-11 12:34:37 +00:00
env:
GIT_COMMITTER_EMAIL: ci-user@github.local
GIT_COMMITTER_NAME: CI User
GIT_AUTHOR_EMAIL: ci-user@github.local
GIT_AUTHOR_NAME: CI User
2020-08-11 08:13:48 +00:00
jobs:
test:
2022-10-09 08:43:59 +00:00
runs-on: ubuntu-${{ matrix.ubuntu_version }}
2020-08-11 08:13:48 +00:00
strategy:
fail-fast: false
2020-08-11 08:13:48 +00:00
matrix:
2022-10-08 12:22:45 +00:00
ubuntu_version: ["22.04"]
2022-10-08 12:23:19 +00:00
python_version: ["3.9"]
2020-08-11 08:13:48 +00:00
repo_type:
- base
- conda
- dockerfile
- external
- julia
- nix
- pipfile
- r
- unit
- venv
include:
2022-10-08 12:22:45 +00:00
# The actions/setup-python action with Python version 3.6 isn't
# possible to use with the ubuntu-22.04 runner, so we use ubuntu-20.04
# for this test where Python 3.6 remain available.
- ubuntu_version: "20.04"
python_version: "3.6"
2020-08-11 08:13:48 +00:00
repo_type: venv
steps:
2022-10-08 11:31:01 +00:00
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
2020-08-11 08:13:48 +00:00
with:
2022-10-08 11:31:01 +00:00
python-version: "${{ matrix.python_version }}"
2020-08-11 08:13:48 +00:00
- name: Install dependencies
run: |
pip install -r dev-requirements.txt
pip freeze
- name: Install repo2docker
2020-08-11 08:13:48 +00:00
run: |
2022-10-23 10:19:15 +00:00
python -m build --wheel .
pip install dist/*.whl
2022-08-22 13:36:23 +00:00
# add for mercurial tests
pip install mercurial hg-evolve
2020-08-11 08:13:48 +00:00
pip freeze
- name: Run pytest
2020-08-11 08:13:48 +00:00
run: |
pytest --verbose --color=yes --durations=10 --cov=repo2docker tests/${{ matrix.repo_type }}
2020-08-11 08:13:48 +00:00
- uses: codecov/codecov-action@v3