From 447f0ec2b90796153f0936b71588c082f61d1295 Mon Sep 17 00:00:00 2001 From: Keavon Chambers Date: Sat, 10 Apr 2021 21:14:56 -0700 Subject: [PATCH] Clean up CI and CD scripts --- .github/workflows/cd.yml | 22 ++++++++++++---------- .github/workflows/ci.yml | 22 ++++++++++++++-------- README.md | 2 +- 3 files changed, 27 insertions(+), 19 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 392ccfd1f..2b7b1ce31 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -1,4 +1,4 @@ -name: Graphite Continuous Deployment +name: Continuous Deployment on: push: @@ -9,24 +9,26 @@ env: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + + - name: ๐Ÿ”ง Set up Node uses: actions/setup-node@v1 with: node-version: '14.x' - - name: Install Dependencies + + - name: ๐Ÿšง Install Node dependencies run: cd client/web && npm install - - name: build node + + - name: ๐Ÿ‘ท Build Graphite web client run: cd client/web && npm run build - - name: Deploy ๐Ÿš€ + + - name: ๐Ÿš€ Deploy web client uses: JamesIves/github-pages-deploy-action@4.1.1 with: - branch: deploy # The branch the action should deploy to. - folder: client/web/dist # The folder the action should deploy. - clean: true + branch: deploy + folder: client/web/dist single-commit: true - git-config-name: Deploy Bot + git-config-name: GitHub Actions diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4fce67a47..c6884222d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,9 @@ -name: Graphite Continuous Integration +name: Continuous Integration on: push: branches: [ master ] + pull_request: branches: [ master ] @@ -11,22 +12,27 @@ env: jobs: build: - runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup Node + + - name: ๐Ÿ”ง Set up Node uses: actions/setup-node@v1 with: node-version: '14.x' - - name: Install Dependencies + + - name: ๐Ÿšง Install Node dependencies run: cd client/web && npm install - - name: build node + + - name: ๐Ÿ‘ท Build Graphite web client run: cd client/web && npm run build - - name: Format + + - name: ๐Ÿ”ฌ Check Rust formatting run: cargo fmt --all -- --check - - name: Build + + - name: ๐Ÿฆ€ Build Rust code run: cargo build --verbose - - name: Run tests + + - name: ๐Ÿงช Run Rust tests run: cargo test --verbose diff --git a/README.md b/README.md index 84d0bb88c..a600ca981 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ npm run serve After editing some Rust and TypeScript code, you may need to manually restart the developments server because this is not properly watching all files right now. (Please submit a PR to help fix this!) -You can also use `npm run build` and the static files will end up in `/client/web/dist` as well as `npm run lint`. +You can also use `npm run lint` as well as `npm run build` (the static files will end up in `/client/web/dist`). ### CLI client