Skip to content

Commit

Permalink
Merge pull request #315 from AnalogJ/beta
Browse files Browse the repository at this point in the history
  • Loading branch information
AnalogJ authored Jul 7, 2022
2 parents eefdc54 + 772b4f6 commit 9ae9c38
Show file tree
Hide file tree
Showing 22 changed files with 405 additions and 380 deletions.
85 changes: 0 additions & 85 deletions .github/workflows/build.yaml

This file was deleted.

78 changes: 78 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI
# This workflow is triggered on pushes & pull requests
on: [pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest
container: ghcr.io/packagrio/packagr:latest-golang

# Service containers to run with `build` (Required for end-to-end testing)
services:
influxdb:
image: influxdb:2.2
env:
DOCKER_INFLUXDB_INIT_MODE: setup
DOCKER_INFLUXDB_INIT_USERNAME: admin
DOCKER_INFLUXDB_INIT_PASSWORD: password12345
DOCKER_INFLUXDB_INIT_ORG: scrutiny
DOCKER_INFLUXDB_INIT_BUCKET: metrics
DOCKER_INFLUXDB_INIT_ADMIN_TOKEN: my-super-secret-auth-token
ports:
- 8086:8086
env:
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
STATIC: true
steps:
- name: Git
run: |
apt-get update && apt-get install -y software-properties-common
add-apt-repository ppa:git-core/ppa && apt-get update && apt-get install -y git
git --version
- name: Checkout
uses: actions/checkout@v2
- name: Test
run: |
make binary-clean binary-test-coverage
- name: Generate coverage report
uses: codecov/codecov-action@v2
with:
files: ${{ github.workspace }}/coverage.txt
flags: unittests
fail_ci_if_error: true
verbose: true
build:
name: Build ${{ matrix.cfg.goos }}/${{ matrix.cfg.goarch }}
runs-on: ${{ matrix.cfg.on }}
env:
GOOS: ${{ matrix.cfg.goos }}
GOARCH: ${{ matrix.cfg.goarch }}
GOARM: ${{ matrix.cfg.goarm }}
STATIC: true
strategy:
matrix:
cfg:
- { on: ubuntu-latest, goos: linux, goarch: amd64 }
- { on: ubuntu-latest, goos: linux, goarch: arm, goarm: 5 }
- { on: ubuntu-latest, goos: linux, goarch: arm, goarm: 6 }
- { on: ubuntu-latest, goos: linux, goarch: arm, goarm: 7 }
- { on: ubuntu-latest, goos: linux, goarch: arm64 }
- { on: macos-latest, goos: darwin, goarch: amd64 }
- { on: macos-latest, goos: darwin, goarch: arm64 }
- { on: macos-latest, goos: freebsd, goarch: amd64 }
- { on: windows-latest, goos: windows, goarch: amd64 }
- { on: windows-latest, goos: windows, goarch: arm64 }
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Build Binaries
run: |
make binary-clean binary-all
- name: Archive
uses: actions/upload-artifact@v2
with:
name: binaries.zip
path: |
scrutiny-web-*
scrutiny-collector-metrics-*
4 changes: 2 additions & 2 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jobs:
options: -v ${{ github.workspace }}:/work
run: |
cd /work
make frontend && echo "print contents of /work/dist" && ls -alt /work/dist
make binary-frontend && echo "print contents of /work/dist" && ls -alt /work/dist
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:
options: -v ${{ github.workspace }}:/work
run: |
cd /work
make frontend && echo "print contents of /work/dist" && ls -alt /work/dist
make binary-frontend && echo "print contents of /work/dist" && ls -alt /work/dist
- name: Set up QEMU
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
options: -v ${{ github.workspace }}:/work
run: |
cd /work
make frontend && echo "print contents of /work/dist" && ls -alt /work/dist
make binary-frontend && echo "print contents of /work/dist" && ls -alt /work/dist
- name: Set up QEMU
Expand Down
83 changes: 0 additions & 83 deletions .github/workflows/release-freebsd.yaml

This file was deleted.

8 changes: 2 additions & 6 deletions .github/workflows/release-frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,7 @@ jobs:
run: "cd webapp/frontend && ./git.version.sh"
- name: Build Frontend
run: |
cd webapp/frontend
npm install -g @angular/[email protected]
npm install
mkdir -p dist
npm run build:prod -- --output-path=dist
make binary-frontend
tar -czf scrutiny-web-frontend.tar.gz dist
- name: Upload Frontend Asset
id: upload-release-asset3
Expand All @@ -32,6 +28,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: './webapp/frontend/scrutiny-web-frontend.tar.gz'
asset_path: './scrutiny-web-frontend.tar.gz'
asset_name: scrutiny-web-frontend.tar.gz
asset_content_type: application/gzip
Loading

0 comments on commit 9ae9c38

Please sign in to comment.