-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add separate environment for code quality test
- Loading branch information
1 parent
bedaf06
commit 7e0dfb7
Showing
8 changed files
with
73 additions
and
19 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Code Quality Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'main' | ||
paths-ignore: | ||
- 'docs/**' | ||
pull_request: | ||
branches: | ||
- 'main' | ||
paths-ignore: | ||
- 'docs/**' | ||
types: | ||
- opened | ||
- reopened | ||
- synchronize | ||
- ready_for_review | ||
|
||
jobs: | ||
test: | ||
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} ( ${{ matrix.group }} ) | ||
runs-on: ${{ matrix.os }} | ||
permissions: # needed to allow julia-actions/cache to delete old caches that it has created | ||
actions: write | ||
contents: read | ||
if: ${{ !github.event.pull_request.draft }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: [1] | ||
os: [ubuntu-latest] | ||
arch: [x64] | ||
group: ['Code Quality'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: julia-actions/setup-julia@v2 | ||
with: | ||
version: ${{ matrix.version }} | ||
arch: ${{ matrix.arch }} | ||
- uses: julia-actions/cache@v1 | ||
# - uses: julia-actions/julia-buildpkg@v1 | ||
- name: Create and set up the code-quality environment | ||
run: | | ||
julia --project=test/code-quality -e ' | ||
import Pkg | ||
Pkg.develop(path=".") # Develop the QuantumToolbox package | ||
Pkg.instantiate() | ||
Pkg.precompile() | ||
' | ||
- name: Run the code-quality tests | ||
run: julia --project=test/code-quality test/code-quality/runtests.jl | ||
|
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[deps] | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
JET = "c3a54625-cd67-489e-a8e7-0a5a0ff4e31b" |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Test | ||
using QuantumToolbox | ||
using Aqua | ||
using JET | ||
|
||
const GROUP = get(ENV, "GROUP", "All") | ||
|
||
const testdir = dirname(@__FILE__) | ||
|
||
if (GROUP == "All") || (GROUP == "Code Quality") | ||
using Aqua | ||
using JET | ||
include(joinpath(testdir, "aqua.jl")) | ||
include(joinpath(testdir, "jet.jl")) | ||
end |
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