Skip to content

Commit

Permalink
Update GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-thom committed Apr 12, 2024
1 parent 3324cf7 commit 7b82964
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,11 @@ jobs:
- name: Generate coverage report
run: |
python -m pytest --disable-warnings --cov=./ --cov-report=xml:coverage.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: NREL/infrasys
file: ./coverage.xml
flags: unittests
env_vars: OS,PYTHON
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/conda_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Conda Build and Upload

on:
release:
types: [published]

jobs:
build:
name: Conda
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.11
- name: Build and upload conda package
shell: bash -l {0}
env:
ANACONDA_TOKEN: ${{ secrets.CONDA_TOKEN }}
run: |
conda install --yes --quiet conda-build conda-verify anaconda-client
conda build conda.recipe/ --channel=conda-forge
anaconda -t $ANACONDA_TOKEN upload -u nrel $(conda build conda.recipe/ --channel=conda-forge --output)
46 changes: 46 additions & 0 deletions .github/workflows/main_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Pytest

on:
schedule:
- cron: "0 0 * * 1-5"
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Run pytest
run: |
python -m pytest -v --disable-warnings tests
mypy:
runs-on: ubuntu-latest
name: "mypy"
steps:
- uses: davidslusser/[email protected]
with:
src: "src"
options: "--ignore-missing-imports"
ruff:
runs-on: ubuntu-latest
name: "ruff"
steps:
- uses: davidslusser/[email protected]
with:
src: "src"
pip_install_command: "pip install -e .[dev]"
python_version: "3.11"
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# infrasys

[![Main - CI](https://github.com/NREL/infrasys/workflows/Main%20-%20CI/badge.svg)](https://github.com/NREL/infrasys/actions/workflows/main_tests.yml)
[![codecov](https://codecov.io/gh/NREL/infrasys/branch/main/graph/badge.svg)](https://codecov.io/gh/NREL/infrasys)

This package implements a data store for components and time series in support of Python-based
modeling packages. While it is designed to support teams modeling transmission and distribution
systems for electrical grids, it can be used by any package that needs to store components
Expand Down

0 comments on commit 7b82964

Please sign in to comment.