80 lines
1.8 KiB
YAML
80 lines
1.8 KiB
YAML
---
|
|
name: "Build Snapshot"
|
|
|
|
on:
|
|
- push
|
|
- workflow_dispatch
|
|
|
|
jobs:
|
|
build-snapshot:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up QEMU
|
|
id: qemu
|
|
uses: docker/setup-qemu-action@v2
|
|
with:
|
|
image: tonistiigi/binfmt:latest
|
|
platforms: arm64,arm
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
cache: 'npm'
|
|
cache-dependency-path: webui/package-lock.json
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: '^1.18.0'
|
|
cache: true
|
|
|
|
- name: grpc
|
|
run: make grpc
|
|
|
|
- name: make daemon
|
|
run: make daemon-compile-x64-lin
|
|
|
|
- name: unit tests
|
|
run: make daemon-unittests
|
|
|
|
- name: ls
|
|
run: ls && pwd
|
|
|
|
- name: run OliveTin for integration tests
|
|
run: ./OliveTin &
|
|
|
|
- name: integration tests
|
|
uses: cypress-io/github-action@v6
|
|
with:
|
|
working-directory: integration-tests
|
|
spec: cypress/e2e/general/*
|
|
|
|
- name: kill OliveTin after integration tests
|
|
run: killall OliveTin
|
|
|
|
- name: goreleaser
|
|
uses: goreleaser/goreleaser-action@v4.2.0
|
|
with:
|
|
distribution: goreleaser
|
|
version: latest
|
|
args: release --snapshot --clean --parallelism 1 --skip-docker
|
|
|
|
- name: Archive binaries
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: "OliveTin-snapshot-${{ github.sha }}-dist"
|
|
path: dist/OliveTin*.*
|
|
|
|
- name: Archive integration tests
|
|
uses: actions/upload-artifact@v3.1.0
|
|
with:
|
|
name: integration-tests
|
|
path: |
|
|
integration-tests
|
|
!integration-tests/node_modules
|