aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-06-02 15:41:25 +0800
committercrupest <crupest@outlook.com>2020-06-02 15:41:25 +0800
commit459021ab54eacbf69a682eea2cbf9c848af2839d (patch)
tree448c8fae229ea1ae2b09db2281993207fb190450 /.github
parent447184ca4ae3f691c0b7007cbb1f002862f12566 (diff)
downloadtimeline-459021ab54eacbf69a682eea2cbf9c848af2839d.tar.gz
timeline-459021ab54eacbf69a682eea2cbf9c848af2839d.tar.bz2
timeline-459021ab54eacbf69a682eea2cbf9c848af2839d.zip
Add Github Actions.
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yaml76
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
new file mode 100644
index 00000000..be473c20
--- /dev/null
+++ b/.github/workflows/ci.yaml
@@ -0,0 +1,76 @@
+name: Routine Build And Test
+
+on:
+ push:
+ branches: [dev]
+ paths-ignore:
+ - "**/README.md"
+ pull_request:
+ branches: [dev]
+ paths-ignore:
+ - "**/README.md"
+
+jobs:
+ front-end:
+ name: Front End Build
+ runs-on: ubuntu-latest
+ defaults:
+ run:
+ working-directory: Timeline/ClientApp
+ shell: bash
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Restore Cache
+ uses: actions/cache@v2
+ with:
+ path: |
+ Timeline/ClientApp/.pnp.*
+ Timeline/ClientApp/.yarn
+ !Timeline/ClientApp/.yarn/releases
+ !Timeline/ClientApp/.yarn/plugins
+ key: yarn-${{ runner.os }}-${{ hashFiles('Timeline/ClientApp/yarn.lock') }}
+ restore-keys: |
+ yarn-${{ runner.os }}-
+
+ - name: Use Node.js 14
+ uses: actions/setup-node@v1
+ with:
+ node-version: "14"
+
+ - name: Restore Packages
+ run: yarn
+
+ - name: Build App
+ run: yarn build
+
+ - name: Upload Artifact
+ uses: actions/upload-artifact@v2
+ with:
+ name: front-end
+ path: Timeline/ClientApp/dist/
+
+ back-end:
+ name: Back End Build And Test
+ runs-on: ubuntu-latest
+ env:
+ ASPNETCORE_ENVIRONMENT: "Development"
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Use .Net Core 3.1.x
+ uses: actions/setup-dotnet@v1
+ with:
+ dotnet-version: "3.1.x"
+
+ - name: Build And Test
+ run: dotnet test --logger html --collect:"XPlat Code Coverage" --settings './Timeline.Tests/coverletArgs.runsettings'
+
+ - name: Upload Test Artifact
+ uses: actions/upload-artifact@v2
+ if: ${{ success() || failure() }}
+ with:
+ name: back-end-test
+ path: Timeline.Tests/TestResults/