From e096a44c1f77e30ffc93962d8b9701a4f63a419b Mon Sep 17 00:00:00 2001 From: Andriy Leliv Date: Wed, 2 Sep 2020 16:29:06 +0300 Subject: [PATCH] Update action ymls --- .github/workflows/demo-deploy-s3.yml | 17 +++++++++++------ .github/workflows/unit-tests.yml | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/demo-deploy-s3.yml b/.github/workflows/demo-deploy-s3.yml index 0696cbca..70244f93 100644 --- a/.github/workflows/demo-deploy-s3.yml +++ b/.github/workflows/demo-deploy-s3.yml @@ -5,15 +5,20 @@ on: tags: - v[0-9]*.[0-9]*.[0-9]* -defaults: - run: - working-directory: demo - jobs: - build: + build-and-unit: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + - run: npm ci + - run: npm run bundle + - run: npm test + deploy: + needs: build-and-unit + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: cache node modules - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 with: @@ -21,7 +26,7 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: us-east-1 - name: Install dependencies - run: npm install + run: npm ci - name: Build package run: npm run build:demo - name: Deploy to S3 bucket diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 897f8ce2..09e54a63 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -7,6 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - run: npm install + - run: npm ci - run: npm run bundle - run: npm test