Update build-ramdisk.yml #9
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
name: Build and Test with Ramdisk | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Step 2: Set up .NET environment | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 9.0.100 | |
# Step 3: Prepare a directory in /dev/shm | |
- name: Set up Ramdisk Directory | |
run: | | |
mkdir -p /dev/shm/ramdisk/project | |
# Step 4: Copy source code to the ramdisk | |
- name: Copy Code to Ramdisk | |
run: | | |
cp -r $GITHUB_WORKSPACE/* /dev/shm/ramdisk/project | |
# Step 5: Debug Directory Contents | |
- name: Debug Directory | |
run: | | |
ls -R /dev/shm/ramdisk/project | |
# Step 6: Build and Test from the ramdisk | |
- name: Build and Test | |
run: | | |
cd /dev/shm/ramdisk/project | |
dotnet build Clean.Architecture.sln --configuration Debug | |
dotnet test Clean.Architecture.sln -- |