Skip to content

Commit

Permalink
ci(github-actions): redundant workflow + formatpr
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Jul 9, 2024
1 parent ea6ccce commit 4dfe91d
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 71 deletions.
69 changes: 0 additions & 69 deletions .github/workflows/Downstream.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/FormatPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: FormatPR
on:
schedule:
- cron: '0 0 * * *'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install JuliaFormatter and format
run: |
julia -e 'using Pkg; Pkg.add(PackageSpec(name="JuliaFormatter"))'
julia -e 'using JuliaFormatter; format(".")'
# https://github.com/marketplace/actions/create-pull-request
# https://github.com/peter-evans/create-pull-request#reference-example
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Format .jl files
title: 'Automatic JuliaFormatter.jl run'
branch: auto-juliaformatter-pr
delete-branch: true
labels: formatting, automated pr, no changelog
- name: Check outputs
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
2 changes: 1 addition & 1 deletion test/qa_tests.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Aqua, LuxDeviceUtils, Test
using Aqua, ExplicitImports, LuxDeviceUtils, Test

@testset "Aqua Tests" begin
Aqua.test_all(LuxDeviceUtils)
Expand Down
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end
@testset "LuxDeviceUtils Tests" begin
file_names = BACKEND_GROUP == "all" ?
["cuda_tests.jl", "amdgpu_tests.jl", "metal_tests.jl", "oneapi_tests.jl"] :
[BACKEND_GROUP * "_tests.jl"]
(BACKEND_GROUP == "cpu" ? [] : [BACKEND_GROUP * "_tests.jl"])
@testset "$(file_name)" for file_name in file_names
run(`$(Base.julia_cmd()) --color=yes --project=$(dirname(Pkg.project().path))
--startup-file=no --code-coverage=user $(@__DIR__)/$file_name`)
Expand Down

0 comments on commit 4dfe91d

Please sign in to comment.