Skip to content

Commit

Permalink
chore: Common up PR and Publish GH actions
Browse files Browse the repository at this point in the history
Sync docker build file

Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
  • Loading branch information
GordonSmith committed Dec 23, 2023
1 parent 79fb505 commit 3496898
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 84 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/npmPublish.yml

This file was deleted.

77 changes: 77 additions & 0 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: teast-and-publish

on:
pull_request:
push:

jobs:
build:
runs-on: ubuntu-20.04

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install NodeJS
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
scope: "@hpcc-js"

- name: Install OS Dependencies
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y git cmake ninja-build wget zip
sudo apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
sudo apt-get install -y python3 python3-pip
- name: Install Dependencies
run: |
npm ci
npm run install-build-deps
- name: Lint
run: |
npm run lint
- name: Build
run: |
npm run build
- name: Test
env:
CI: true
run: |
npm run test
- name: Calculate Coverage
run: |
npm run coverage
npm run coverage-report
- name: Update Coveralls
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}


- name: Publish
if: github.ref_type == 'tag'
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
npm run publish
- name: Purge jsdelivr
if: github.ref_type == 'tag'
run: |
npm run purge-jsdelivr
- name: Create Release
if: github.ref_type == 'tag'
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
37 changes: 0 additions & 37 deletions .github/workflows/testPullRequest.yml

This file was deleted.

14 changes: 5 additions & 9 deletions docker/ubuntu-dev.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN apt-get update
RUN apt-get upgrade -y

RUN apt-get install -y build-essential
RUN apt-get install -y git cmake wget zip
RUN apt-get install -y git cmake ninja-build wget zip
RUN apt-get install -y gcc-multilib g++-multilib pkg-config autoconf bison libtool flex
RUN apt-get install -y python3 python3-pip

Expand All @@ -23,20 +23,16 @@ RUN apt-get install -y nodejs
# Set the working directory
WORKDIR /usr/src-ts/app

COPY ./src-cpp ./src-cpp
COPY ./src-ts ./src-ts
COPY ./utils ./utils
COPY ./*.* .

RUN npm ci

COPY ./scripts ./scripts
RUN ./scripts/cpp-install-emsdk.sh

COPY ./vcpkg-overlays ./vcpkg-overlays
COPY ./vcpkg.json ./vcpkg.json
RUN ./scripts/cpp-install-vcpkg.sh
RUN npm run install-build-deps

COPY ./src-cpp ./src-cpp
COPY ./src-ts ./src-ts
COPY ./utils ./utils
RUN npm run build

CMD ["npm", "run", "test-node"]

0 comments on commit 3496898

Please sign in to comment.