Files
benchmark/.github/workflows/main.yml

57 lines
1.6 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"]
steps:
- uses: actions/checkout@v2
- 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
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
- 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