-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
44 lines (36 loc) · 1.06 KB
/
build-ramdisk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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 --