This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:cglewis/CRviz
- Loading branch information
Showing
7 changed files
with
2,873 additions
and
1,293 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Docker Build | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
buildx: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Get the version | ||
id: get_version | ||
run: echo ::set-output name=VERSION::$(echo $GITHUB_REF | cut -d / -f 3) | ||
- name: Change for master | ||
id: change_version | ||
run: if [ "${{ steps.get_version.outputs.VERSION }}" == "master" ]; then echo ::set-output name=VERSION::latest; else echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}; fi | ||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: crazy-max/ghaction-docker-buildx@v3 | ||
with: | ||
buildx-version: latest | ||
qemu-version: latest | ||
|
||
- name: Build Docker | ||
run: | | ||
docker build \ | ||
-t cyberreboot/crviz:${{ steps.change_version.outputs.VERSION }} . && \ | ||
docker build \ | ||
-f Dockerfile.gh \ | ||
-t cyberreboot/crviz-gh:${{ steps.change_version.outputs.VERSION }} . | ||
if: github.repository == 'cyberreboot/crviz' && github.event_name == 'pull_request' | ||
|
||
- name: Docker Login | ||
env: | ||
DOCKER_PASSWORD: ${{ secrets.DOCKER_TOKEN }} | ||
run: | | ||
echo "${DOCKER_PASSWORD}" | docker login --username "${{ secrets.DOCKER_USERNAME }}" --password-stdin | ||
if: github.repository == 'cyberreboot/crviz' && github.event_name == 'push' | ||
|
||
- name: Push Docker | ||
env: | ||
DOCKER_CLI_EXPERIMENTAL: enabled | ||
run: | | ||
docker buildx build \ | ||
--platform linux/amd64,linux/arm/v7,linux/arm64 \ | ||
--push \ | ||
-t cyberreboot/crviz:${{ steps.change_version.outputs.VERSION }} . | ||
if: github.repository == 'cyberreboot/crviz' && github.event_name == 'push' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Unit Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [10.x, 12.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm ci --no-optional | ||
- run: npm test | ||
env: | ||
CI: true | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v1.0.6 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
if: github.repository == 'cyberreboot/crviz' |
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
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
Oops, something went wrong.