fix: convert to unitful for dimensionless #790
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: CI | |
on: | |
push: | |
branches: | |
- main | |
tags: ['*'] | |
pull_request: | |
concurrency: | |
# Skip intermediate builds: always. | |
# Cancel intermediate builds: only if it is a pull request build. | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }} | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.6' | |
- '1.8' | |
- '1' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v2 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: "Run tests" | |
shell: bash | |
run: | | |
julia --color=yes -e 'import Pkg; Pkg.add("Coverage")' | |
julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user -e 'import Coverage; import Pkg; Pkg.activate("."); Pkg.test(coverage=true)' | |
DQ_TEST_UPREFERRED=true julia --color=yes --threads=auto --check-bounds=yes --depwarn=yes --code-coverage=user -e 'import Coverage; import Pkg; Pkg.activate("."); Pkg.test(coverage=true)' | |
julia --color=yes coverage.jl | |
- name: "Coveralls" | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
file: lcov.info | |
parallel: true | |
flag-name: julia-${{ matrix.version }}-${{ matrix.os }}-${{ matrix.arch }} | |
coveralls: | |
name: Indicate completion to coveralls | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Finish | |
uses: coverallsapp/github-action@v2 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: '1' | |
- name: Configure doc environment | |
run: | | |
julia --project=docs/ -e ' | |
using Pkg | |
Pkg.develop(PackageSpec(path=pwd())) | |
Pkg.instantiate()' | |
- uses: julia-actions/julia-buildpkg@v1 | |
- uses: julia-actions/julia-docdeploy@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- run: | | |
julia --project=docs -e ' | |
using Documenter: DocMeta, doctest | |
using DynamicQuantities | |
DocMeta.setdocmeta!(DynamicQuantities, :DocTestSetup, :(using DynamicQuantities); recursive=true) | |
doctest(DynamicQuantities)' |