draft: start work on solution inspection tools #355
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.6' | |
- '1' | |
os: | |
- ubuntu-latest | |
- macos-latest | |
- windows-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: actions/cache@v1 | |
env: | |
cache-name: cache-artifacts | |
with: | |
path: ~/.julia/artifacts | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }} | |
restore-keys: | | |
${{ runner.os }}-test-${{ env.cache-name }}- | |
${{ runner.os }}-test- | |
${{ runner.os }}- | |
- uses: julia-actions/julia-buildpkg@latest | |
- run: | | |
git config --global user.name Tester | |
git config --global user.email [email protected] | |
- uses: julia-actions/julia-runtest@latest | |
continue-on-error: ${{ matrix.version == '1.2' }} | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |
pd-test: | |
name: PowerDynamics.jl test - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: julia-actions/setup-julia@latest | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/julia-buildpkg@latest | |
- uses: actions/checkout@v2 | |
with: | |
repository: JuliaEnergy/PowerDynamics.jl | |
path: PowerDynamics.jl | |
- name: Run PD tests | |
shell: julia --project=PowerDynamics.jl {0} | |
run: | | |
import Pkg | |
try | |
Pkg.develop(path=".") | |
Pkg.update() | |
Pkg.precompile() | |
Pkg.test() | |
catch e | |
if e isa Pkg.Resolve.ResolverError | |
@info "Resolve error! No need to test a breaking release..." e | |
exit(0) | |
else | |
rethrow(e) | |
end | |
end |