Skip to content

Commit

Permalink
ci: update tests workflow to use centralised reusable workflow and au…
Browse files Browse the repository at this point in the history
…to-suggest format changes (#159)

* ci: update tests workflow to use centralised reusable workflow

* ci: remove `FormatCheck` workflow

Remove the `FormatCheck` workflow, since code in the repository should
always be compliant with the SciML style, thus eliminating the need for
automated formatting PRs.

* ci(format-check): automatically comment formatting suggestions on PRs

* chore: rename to BACKEND_GROUP

* revert: rename to BACKEND_GROUP

* fix: fallback to GROUP

* fix: fallback to GROUP

* fix: typo

---------

Co-authored-by: Avik Pal <avikpal@mit.edu>
  • Loading branch information
thazhemadam and avik-pal authored Sep 6, 2024
1 parent b864f6b commit ec41b75
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 84 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/CI.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/FormatCheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:
jobs:
format-check:
name: "Format Check"
uses: "SciML/.github/.github/workflows/format-check.yml@v1"
uses: "SciML/.github/.github/workflows/format-suggestions-on-pr.yml@v1"
29 changes: 0 additions & 29 deletions .github/workflows/FormatPR.yml

This file was deleted.

25 changes: 25 additions & 0 deletions .github/workflows/Tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "Tests"

on:
pull_request:
branches:
- main
paths-ignore:
- 'docs/**'
push:
branches:
- main
paths-ignore:
- 'docs/**'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch || github.ref != 'refs/tags/v*' }}

jobs:
tests:
name: "Tests"
uses: "SciML/.github/.github/workflows/tests.yml@v1"
with:
group: "CPU"
secrets: "inherit"
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ using ReTestItems, Pkg, InteractiveUtils, Hwloc

@info sprint(versioninfo)

const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", "all"))
const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", get(ENV, "GROUP", "all")))
const EXTRA_PKGS = String[]

(BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda") && push!(EXTRA_PKGS, "LuxCUDA")
Expand Down
2 changes: 1 addition & 1 deletion test/shared_testsetup.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ using MLDataDevices, GPUArraysCore

LuxTestUtils.jet_target_modules!(["DeepEquilibriumNetworks", "Lux", "LuxLib"])

const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", "all"))
const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", get(ENV, "GROUP", "all")))

if BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda"
using LuxCUDA
Expand Down

0 comments on commit ec41b75

Please sign in to comment.