|
10 | 10 | # Define each session of execution that should be executed |
11 | 11 | jobs: |
12 | 12 | # Execution session that builds the artifacts that are used for deployment |
13 | | - Build-Artifact: |
| 13 | + Test-Artifact: |
14 | 14 | # Display name of the job |
15 | | - name: Build Artifact |
| 15 | + name: Test Artifact |
16 | 16 |
|
17 | 17 | # Configures the filter for which operating system that should be used when selecting runners |
18 | 18 | runs-on: ubuntu-latest |
19 | | - |
20 | | - # Sets the scopes available to the github_token injected to the GH Actions runner |
21 | | - permissions: |
22 | | - attestations: write |
23 | | - contents: read |
24 | | - id-token: write |
25 | 19 |
|
26 | 20 | # Set of commands to run for the build job |
27 | 21 | steps: |
|
61 | 55 |
|
62 | 56 | # Compile the Typescript files to JS |
63 | 57 | - name: Build Project in Development Mode |
64 | | - run: npm run-script build:Prod |
| 58 | + run: npm run-script build:Dev |
65 | 59 |
|
66 | 60 | # Run all of the Unit Tests |
67 | 61 | - name: Runt Unit Tests |
|
71 | 65 | - name: Run Lint Tests |
72 | 66 | run: npm run-script lint |
73 | 67 |
|
74 | | - # Install all of the production only dependencies |
75 | | - - name: Clear All but Runtime Dependencies |
76 | | - run: npm ci --omit=dev |
| 68 | + # Execution session that builds the artifacts that are used for deployment |
| 69 | + Build-Artifact: |
| 70 | + # Display name of the job |
| 71 | + name: Build Artifact |
| 72 | + |
| 73 | + # Configures the filter for which operating system that should be used when selecting runners |
| 74 | + runs-on: ubuntu-latest |
| 75 | + |
| 76 | + # Require the build step to complete before running the deployment |
| 77 | + needs: Test-Artifact |
| 78 | + |
| 79 | + # Sets the scopes available to the github_token injected to the GH Actions runner |
| 80 | + permissions: |
| 81 | + attestations: write |
| 82 | + contents: read |
| 83 | + id-token: write |
| 84 | + |
| 85 | + # Set of commands to run for the build job |
| 86 | + steps: |
| 87 | + # Checks-out your repository under $GITHUB_WORKSPACE |
| 88 | + - name: Clone Repo |
| 89 | + uses: actions/checkout@v4 |
| 90 | + |
| 91 | + # Set up NodeJS on the build host with caching support to optimize execution |
| 92 | + - name: Set up Node.js |
| 93 | + uses: actions/setup-node@v4 |
| 94 | + with: |
| 95 | + node-version: 20.x |
| 96 | + cache: npm |
| 97 | + cache-dependency-path: package-lock.json |
| 98 | + |
| 99 | + # Install all of the dependencies |
| 100 | + - name: Install All of the Project Dependencies |
| 101 | + run: npm install |
| 102 | + |
| 103 | + # Compile the Typescript files to JS |
| 104 | + - name: Build Project in Development Mode |
| 105 | + run: npm run-script build:Prod |
77 | 106 |
|
78 | 107 | # Create a ZIP archive of the server files to speed up the upload process |
79 | 108 | - name: Zip up Server Files |
@@ -103,14 +132,14 @@ jobs: |
103 | 132 | # Configures the filter for which operating system that should be used when selecting runners |
104 | 133 | runs-on: ubuntu-latest |
105 | 134 |
|
| 135 | + # Require the build step to complete before running the deployment |
| 136 | + needs: Build-Artifact |
| 137 | + |
106 | 138 | # Sets the scopes available to the github_token injected to the GH Actions runner |
107 | 139 | permissions: |
108 | 140 | id-token: write |
109 | 141 | contents: none |
110 | 142 |
|
111 | | - # Require the build step to complete before running the deployment |
112 | | - needs: Build-Artifact |
113 | | - |
114 | 143 | # The deploy step runs in the Azure environment context |
115 | 144 | environment: NPM |
116 | 145 |
|
|
0 commit comments