Skip to content

Commit

Permalink
Separate formatting from unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
GhostWalker562 committed Sep 20, 2024
1 parent 6070e8b commit 75a4155
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .github/actions/setup-dotnet/action.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: "Setup .NET"
description: |
Installs .NET and restores dependencies.
inputs:
build:
description: "Whether to build the project after restoring dependencies"
required: false
default: true

runs:
using: composite
Expand All @@ -22,6 +27,7 @@ runs:
shell: bash

- name: Build Project
if: ${{ inputs.build }}
run: dotnet build --configuration Release --no-restore
working-directory: ./
shell: bash
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
env:
GIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}

name: "C#/.NET Unit Tests"
name: "C#/.NET Checks"
on:
pull_request:
types: [labeled, opened, synchronize, reopened, auto_merge_enabled]
Expand All @@ -21,10 +21,23 @@ jobs:
- name: Setup .NET
uses: ./.github/actions/setup-dotnet

- name: Check Formatting
uses: ./.github/actions/check-formatting

- name: Run Tests
run: dotnet test --no-restore --verbosity normal
working-directory: ./Aptos.Tests
shell: bash

run-format-check:
name: Check Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ env.GIT_SHA }}

- name: Setup .NET
uses: ./.github/actions/setup-dotnet
with:
build: false

- name: Check Formatting
uses: ./.github/actions/check-formatting

0 comments on commit 75a4155

Please sign in to comment.