Bump semver from 6.3.0 to 6.3.1 #57
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Main" | |
on: push | |
jobs: | |
unit-tests: | |
name: Run unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Use Node.js ${{ matrix.node-version}} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: Install | |
run: npm install | |
- name: Test | |
run: npm test | |
gcp-deployment: | |
name: Cloud Run deployment | |
needs: unit-tests | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
env: | |
IMAGE_NAME: eu.gcr.io/${{ secrets.GCP_PROJECT }}/framework | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Authenticate Cloud SDK | |
id: authenticate | |
uses: google-github-actions/setup-gcloud@master | |
with: | |
project_id: ${{ secrets.GCP_PROJECT }} | |
service_account_key: ${{ secrets.GCP_SA_KEY }} | |
export_default_credentials: true | |
- name: Authorize Docker | |
run: gcloud auth configure-docker | |
- name: Build Docker image | |
run: docker build -t ${{ env.IMAGE_NAME }}:${{ github.sha }} . | |
- name: Push Docker image | |
run: docker push ${{ env.IMAGE_NAME }}:${{ github.sha }} | |
- name: Deploy to Cloud Run | |
id: deploy | |
uses: google-github-actions/deploy-cloudrun@main | |
with: | |
service: framework | |
image: ${{ env.IMAGE_NAME }}:${{ github.sha }} | |
region: europe-west1 | |
credentials: ${{ secrets.GCP_SA_KEY }} | |
e2e-tests: | |
name: Run Cypress tests | |
needs: gcp-deployment | |
if: ${{ github.ref == 'refs/heads/master' }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version}} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
check-latest: true | |
- name: Install | |
run: npm install | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
start: npm run cypress |