Skip to content

Commit

Permalink
chore: reformat and enforce formatting (#1035)
Browse files Browse the repository at this point in the history
* chore: reformat and enforce formatting
  • Loading branch information
ajewellamz authored May 17, 2024
1 parent cbde4ef commit 8a76a9d
Show file tree
Hide file tree
Showing 358 changed files with 321,854 additions and 25,072 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/ci_codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
library:
[
DynamoDbEncryption,
TestVectors
]
library: [DynamoDbEncryption, TestVectors]
# Note dotnet is only used for formatting generated code
# in this workflow
dotnet-version: ["6.0.x"]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci_duvet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# with respect to the specification
name: Duvet report

on:
on:
pull_request:
push:
branches:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/ci_examples_java.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs tests in Java.
name: Java Examples

on:
on:
pull_request:
push:
branches:
Expand All @@ -12,7 +12,7 @@ on:
# (accordingly to the "nightly" parameter).
inputs:
nightly:
description: 'Run the nightly build'
description: "Run the nightly build"
required: false
type: boolean
schedule:
Expand All @@ -30,10 +30,8 @@ jobs:
strategy:
max-parallel: 1
matrix:
java-version: [ 8, 11, 16, 17 ]
os: [
macos-12
]
java-version: [8, 11, 16, 17]
os: [macos-12]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -48,12 +46,12 @@ jobs:

- uses: actions/checkout@v3
with:
submodules: recursive
submodules: recursive

- name: Setup Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
distribution: "corretto"
java-version: ${{ matrix.java-version }}

- name: Setup Dafny
Expand All @@ -80,4 +78,3 @@ jobs:
# Run migration examples
gradle -p runtimes/java/Migration/PlaintextToAWSDBE test
gradle -p runtimes/java/Migration/DDBECToAWSDBE test
16 changes: 6 additions & 10 deletions .github/workflows/ci_examples_net.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs tests in .NET.
name: dotnet examples

on:
on:
pull_request:
push:
branches:
Expand All @@ -13,13 +13,9 @@ jobs:
if: (github.repository_owner == 'aws')
strategy:
matrix:
library: [
DynamoDbEncryption,
]
dotnet-version: [ '6.0.x' ]
os: [
macos-12,
]
library: [DynamoDbEncryption]
dotnet-version: ["6.0.x"]
os: [macos-12]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -30,7 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
submodules: recursive

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
Expand All @@ -42,7 +38,7 @@ jobs:
with:
dafny-version: ${{ '4.2.0' }}

- name: Download Dependencies
- name: Download Dependencies
working-directory: ./${{ matrix.library }}
run: make setup_net

Expand Down
16 changes: 6 additions & 10 deletions .github/workflows/ci_test_java.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs tests in Java.
name: Library Java tests

on:
on:
pull_request:
push:
branches:
Expand All @@ -12,7 +12,7 @@ on:
# (accordingly to the "nightly" parameter).
inputs:
nightly:
description: 'Run the nightly build'
description: "Run the nightly build"
required: false
type: boolean
schedule:
Expand All @@ -29,13 +29,9 @@ jobs:
if: github.event_name != 'schedule' || github.repository_owner == 'aws'
strategy:
matrix:
library: [
DynamoDbEncryption
]
java-version: [ 8, 11, 16, 17 ]
os: [
macos-12
]
library: [DynamoDbEncryption]
java-version: [8, 11, 16, 17]
os: [macos-12]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand Down Expand Up @@ -70,7 +66,7 @@ jobs:
- name: Setup Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
distribution: "corretto"
java-version: ${{ matrix.java-version }}

- name: Build ${{ matrix.library }} implementation
Expand Down
35 changes: 14 additions & 21 deletions .github/workflows/ci_test_net.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs tests in .NET.
name: test dotnet

on:
on:
pull_request:
push:
branches:
Expand All @@ -12,7 +12,7 @@ on:
# (accordingly to the "nightly" parameter).
inputs:
nightly:
description: 'Run the nightly build'
description: "Run the nightly build"
required: false
type: boolean
schedule:
Expand All @@ -30,15 +30,9 @@ jobs:
if: (github.event_name != 'schedule' || github.repository_owner == 'aws')
strategy:
matrix:
library: [
DynamoDbEncryption,
]
dotnet-version: [ '6.0.x' ]
os: [
macos-12,
ubuntu-latest,
windows-latest
]
library: [DynamoDbEncryption]
dotnet-version: ["6.0.x"]
os: [macos-12, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -52,7 +46,7 @@ jobs:
git config --global core.longpaths true
- uses: actions/checkout@v3
with:
submodules: recursive
submodules: recursive

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
Expand All @@ -73,8 +67,8 @@ jobs:
library: ${{ matrix.library }}
diff-generated-code: false
update-and-regenerate-mpl: true
- name: Download Dependencies

- name: Download Dependencies
working-directory: ./${{ matrix.library }}
run: make setup_net

Expand All @@ -92,16 +86,16 @@ jobs:
# This works because `node` is installed by default on GHA runners
CORES=$(node -e 'console.log(os.cpus().length)')
make transpile_net CORES=$CORES
- name: Test ${{ matrix.library }} net48
if: matrix.os == 'windows-latest'
working-directory: ./${{ matrix.library }}
shell: bash
run: |
dotnet restore runtimes/net/tests
dotnet build runtimes/net/tests
make test_net FRAMEWORK=net48
dotnet restore runtimes/net/tests
dotnet build runtimes/net/tests
make test_net FRAMEWORK=net48
- name: Test ${{ matrix.library }} net6.0
working-directory: ./${{ matrix.library }}
shell: bash
Expand All @@ -113,12 +107,11 @@ jobs:
else
make test_net FRAMEWORK=net6.0
fi
- name: Test Build and Pack ${{ matrix.library}}
shell: bash
if: matrix.os != 'windows-latest'
working-directory: ./${{ matrix.library }}
run: |
dotnet build runtimes/net /p:Configuration=Release -nowarn:CS0162,CS0168
dotnet pack runtimes/net/DynamoDbEncryption.csproj --no-build /p:Configuration=Release --output build
16 changes: 8 additions & 8 deletions .github/workflows/ci_test_vector_java.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs test vectors in Java.
name: Library Java Test Vectors

on:
on:
pull_request:
push:
branches:
Expand All @@ -11,11 +11,11 @@ jobs:
testJava:
strategy:
matrix:
java-version: [ 8, 11, 16, 17 ]
java-version: [8, 11, 16, 17]
os: [
# Run on ubuntu image that comes pre-configured with docker
ubuntu-latest
]
# Run on ubuntu image that comes pre-configured with docker
ubuntu-latest,
]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -25,7 +25,7 @@ jobs:
uses: rrainn/[email protected]
with:
port: 8000
cors: '*'
cors: "*"

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -41,12 +41,12 @@ jobs:
- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: '4.2.0'
dafny-version: "4.2.0"

- name: Setup Java ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
distribution: 'corretto'
distribution: "corretto"
java-version: ${{ matrix.java-version }}

- name: Build TestVectors implementation
Expand Down
15 changes: 7 additions & 8 deletions .github/workflows/ci_test_vector_net.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow performs test vectors in DotNet.
name: Library DotNet Test Vectors

on:
on:
pull_request:
push:
branches:
Expand All @@ -11,11 +11,11 @@ jobs:
testDotNet:
strategy:
matrix:
dotnet-version: [ '6.0.x' ]
dotnet-version: ["6.0.x"]
os: [
# Run on ubuntu image that comes pre-configured with docker
ubuntu-latest
]
# Run on ubuntu image that comes pre-configured with docker
ubuntu-latest,
]
runs-on: ${{ matrix.os }}
permissions:
id-token: write
Expand All @@ -25,7 +25,7 @@ jobs:
uses: rrainn/[email protected]
with:
port: 8000
cors: '*'
cors: "*"

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Setup Dafny
uses: dafny-lang/[email protected]
with:
dafny-version: '4.2.0'
dafny-version: "4.2.0"

- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v4
Expand All @@ -62,4 +62,3 @@ jobs:
dotnet run
cp ../java/*.json .
dotnet run --framework net6.0
2 changes: 1 addition & 1 deletion .github/workflows/ci_todos.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow prevents TODOs in code
name: Check TODOs in code

on:
on:
pull_request:
push:
branches:
Expand Down
10 changes: 3 additions & 7 deletions .github/workflows/ci_tv_verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
# (accordingly to the "nightly" parameter).
inputs:
nightly:
description: 'Run the nightly build'
description: "Run the nightly build"
required: false
type: boolean
schedule:
Expand All @@ -31,12 +31,8 @@ jobs:
matrix:
# Break up verification between namespaces over multiple
# actions to take advantage of parallelization
service: [
DDBEncryption
]
os: [
macos-12,
]
service: [DDBEncryption]
os: [macos-12]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down
Loading

0 comments on commit 8a76a9d

Please sign in to comment.