doc: Create CODEOWNERS file (#102) #327
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 | |
# Run on main, any tag or any pull request | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
tags: '*' | |
concurrency: | |
# cancel in progress builds for pull requests | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ startswith(github.ref, 'refs/pull/') }} | |
jobs: | |
os-test: | |
runs-on: ${{ matrix.os }} | |
# don't run on draft PRs | |
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | |
# allow windows to fail | |
continue-on-error: ${{ matrix.os == 'windows-latest' || matrix.group == 'PyBraket-unit' }} | |
strategy: | |
fail-fast: true | |
max-parallel: 2 | |
matrix: | |
group: | |
- Braket-unit | |
- PyBraket-unit | |
os: [windows-latest, macOS-latest] | |
arch: ['x64'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: 1.9 | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/julia-buildpkg@latest | |
- run: | | |
git config --global user.name Tester | |
git config --global user.email [email protected] | |
- name: "Dev PyBraket package on Windows" | |
if: ${{ matrix.os == 'windows-latest' }} | |
run: | | |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))' | |
# must escape for windows | |
- name: "Dev PyBraket package on OSX" | |
if: ${{ matrix.os == 'macOS-latest' }} | |
run: | | |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))' | |
- name: "Run tests" | |
uses: julia-actions/julia-runtest@v1 | |
env: | |
GROUP: ${{ matrix.group }} | |
BRAKET_CI: true | |
JULIA_CONDAPKG_VERBOSITY: 2 | |
version-test: | |
runs-on: ubuntu-latest | |
# don't run on draft PRs | |
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | |
# allow failures on nightly or beta Julia | |
continue-on-error: ${{ matrix.version == 'nightly' || matrix.group == 'PyBraket-unit' }} | |
strategy: | |
fail-fast: true | |
max-parallel: 2 | |
matrix: | |
group: | |
- Braket-unit | |
- PyBraket-unit | |
version: ['1.6', '1.7', '1.8', '1.9', '1.10', 'nightly'] | |
arch: ['x64'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/julia-buildpkg@latest | |
- run: | | |
git config --global user.name Tester | |
git config --global user.email [email protected] | |
- name: "Dev PyBraket package" | |
run: | | |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))' | |
- name: "Run tests" | |
uses: julia-actions/julia-runtest@v1 | |
env: | |
JULIA_CONDAPKG_VERBOSITY: 2 | |
BRAKET_CI: true | |
GROUP: ${{ matrix.group }} | |
- name: "Process coverage" | |
uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,PyBraket/src | |
- name: "Upload coverage" | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
examples: | |
name: Example notebooks | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }} | |
needs: [os-test, version-test] | |
strategy: | |
fail-fast: true | |
matrix: | |
group: | |
- Examples-unit | |
version: ['1.9'] | |
arch: ['x64'] | |
steps: | |
- uses: actions/checkout@v1 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/julia-buildpkg@latest | |
- run: | | |
git config --global user.name Tester | |
git config --global user.email [email protected] | |
- name: "Dev PyBraket package" | |
run: | | |
julia --project -e 'using Pkg; Pkg.develop(path=joinpath(pwd(), "PyBraket"))' | |
- name: "Run tests" | |
uses: julia-actions/julia-runtest@v1 | |
env: | |
JULIA_CONDAPKG_VERBOSITY: 2 | |
BRAKET_CI: true | |
GROUP: ${{ matrix.group }} | |
- name: "Process coverage" | |
uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,PyBraket/src | |
- name: "Upload coverage" | |
uses: codecov/codecov-action@v2 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: lcov.info | |
docs: | |
name: Documentation | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created | |
contents: write | |
statuses: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: '1.10' | |
- uses: julia-actions/cache@v1 | |
- name: Configure doc environment | |
shell: julia --project=docs --color=yes {0} | |
run: | | |
using Pkg | |
Pkg.Registry.update() | |
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 }} | |
- name: Run doctests | |
shell: julia --project=docs --color=yes {0} | |
run: | | |
using Documenter: DocMeta, doctest | |
using Braket | |
DocMeta.setdocmeta!(Braket, :DocTestSetup, :(using Braket); recursive=true) | |
doctest(Braket) |