mirror of
https://github.com/Doctorado-ML/benchmark.git
synced 2025-08-16 07:55:54 +00:00
62 lines
1.7 KiB
YAML
62 lines
1.7 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [macos-latest, ubuntu-latest]
|
|
python: ["3.10", "3.11"]
|
|
exclude:
|
|
- os: macos-latest
|
|
python: "3.11"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up Python ${{ matrix.python }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python }}
|
|
# Make dot command available in the environment
|
|
- name: Setup Graphviz
|
|
uses: ts-graphviz/setup-graphviz@v1
|
|
- uses: r-lib/actions/setup-r@v2
|
|
- name: Install R dependencies
|
|
env:
|
|
GITHUB_PAT: ${{ secrets.PAT_TOKEN }}
|
|
run: |
|
|
install.packages("remotes")
|
|
remotes::install_github("jacintoarias/exreport")
|
|
shell: Rscript {0}
|
|
# Allows install Wodt in dependencies.
|
|
- uses: webfactory/ssh-agent@v0.5.4
|
|
with:
|
|
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
# - name: Setup tmate session
|
|
# uses: mxschmitt/action-tmate@v3
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install -q --upgrade pip
|
|
pip install -q -r requirements.txt
|
|
pip install -q --upgrade codecov coverage black flake8
|
|
- name: Lint
|
|
run: |
|
|
black --check --diff benchmark
|
|
flake8 --count benchmark --ignore=E203,W503
|
|
- name: Tests
|
|
run: |
|
|
coverage run -m unittest -v benchmark.tests
|
|
coverage xml
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v1
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
files: ./coverage.xml
|