Skip to content

Merge pull request #2209 from dictyBase/dependabot/npm_and_yarn/follo… #976

Merge pull request #2209 from dictyBase/dependabot/npm_and_yarn/follo…

Merge pull request #2209 from dictyBase/dependabot/npm_and_yarn/follo… #976

Workflow file for this run

name: Node CI Develop
on:
push:
branches:
- develop
jobs:
test:
runs-on: ubuntu-20.04
steps:
- name: set up node.js
uses: actions/setup-node@v4
with:
node-version: 16
- name: check out code
uses: actions/checkout@v4
- name: rename config file
run: mv src/common/utils/clientConfig.sample.ts src/common/utils/clientConfig.ts
- name: install
run: yarn install
- name: unit tests
run: yarn test-coverage
env:
CI: true
- name: upload test coverage to codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
build:
needs: test
runs-on: ubuntu-20.04
steps:
- name: check out code
uses: actions/checkout@v4
- name: set up docker buildx
uses: docker/setup-buildx-action@v3
- name: cache docker layers
uses: actions/[email protected]
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: log into dockerhub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USER }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: get short sha
id: type
run: |
sha=$(git rev-parse --short HEAD)
echo ::set-output name=id::${sha}
- name: docker build and push (ericdev)
uses: docker/build-push-action@v5
with:
push: true
tags: dictybase/dicty-frontpage:ericdev-develop-${{ steps.type.outputs.id }}
build-args: |
graphql_server=https://ericgraphql.dictybase.dev
client_keys=https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.1/clientConfig.eric.js
ga_tracking_id=-UA-146763741-1
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache
- name: docker build and push (devsidd)
uses: docker/build-push-action@v5
with:
push: true
tags: dictybase/dicty-frontpage:devsidd-develop-${{ steps.type.outputs.id }}
build-args: |
graphql_server=https://siddgraphql.dictybase.dev
client_keys=https://raw.githubusercontent.com/dictybase-playground/client-keys/2.0.1/clientConfig.sidd.js
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache