Skip to content

Commit

Permalink
Merge pull request #51 from wepala/dev
Browse files Browse the repository at this point in the history
Sprint 19 - Create item
  • Loading branch information
RandyDeo authored Jan 21, 2022
2 parents 3445161 + 722841e commit c089982
Show file tree
Hide file tree
Showing 58 changed files with 4,617 additions and 1,631 deletions.
106 changes: 100 additions & 6 deletions .github/workflows/dev.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Development Workflow
name: Development workflow

on:
push:
branches:
Expand All @@ -8,29 +9,122 @@ on:

env:
SLACK_CHANNEL: weos
SLACK_USERNAME: WeOS CI
SLACK_USERNAME: WeOS API
SLACK_ICON: https://github.com/wepala.png?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: copyright 2021 Wepala
SLACK_FOOTER: copyright 2022 Wepala

jobs:
prep:
runs-on: ubuntu-latest
build-api:
name: Release Go Binaries
outputs:
today: ${{ steps.date.outputs.today }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Run Sqlite3 integration tests
- name: Run unit tests
run: go test -v ./...
- name: Run Postgres projections tests
run: go test -v ./projections -driver=postgres
- name: Run Mysql projections tests
run: go test -v ./projections -driver=mysql
- uses: crazy-max/ghaction-xgo@v1
name: build linux and mac
with:
xgo_version: latest
go_version: 1.16.x
dest: .
prefix: weos
targets: linux/386,linux/amd64,darwin/amd64,windows/386,windows/amd64
v: true
x: false
race: false
ldflags: -s -w
buildmode: default
- name: setup app
run: |
#setup go tests
go install github.com/cucumber/godog/cmd/godog@latest
godog -t long
#setup mac build
mkdir -p build/mac
cp api.yaml build/mac/api.yaml
cp README.md build/mac/README.md
cp LICENSE build/mac/LICENSE
cp NOTICE.txt build/mac/NOTICE.txt
cp weos-darwin-10.16-amd64 build/mac/weos
chmod +x build/mac/weos
tar -czf weos-mac-amd64.tar.gz -C build/mac .
#setup linux 32 bit build
mkdir -p build/linux32/apps/admin
cp api.yaml build/linux32/api.yaml
cp README.md build/linux32/README.md
cp LICENSE build/linux32/LICENSE
cp NOTICE.txt build/linux32/NOTICE.txt
cp weos-linux-386 build/linux32/weos
chmod +x build/linux32/weos
tar -czf weos-linux-386.tar.gz -C build/linux32 .
#setup linux 64 bit build
mkdir -p build/linux64/apps/admin
cp api.yaml build/linux64/api.yaml
cp README.md build/linux64/README.md
cp LICENSE build/linux64/LICENSE
cp NOTICE.txt build/linux64/NOTICE.txt
cp weos-linux-amd64 build/linux64/weos
chmod +x build/linux64/weos
tar -czf weos-linux-amd64.tar.gz -C build/linux64 .
#setup windows 32 bit build
mkdir -p build/win32/apps/admin
cp api.yaml build/win32/api.yaml
cp README.md build/win32/README.md
cp LICENSE build/win32/LICENSE
cp NOTICE.txt build/win32/NOTICE.txt
cp weos-windows-4.0-386.exe build/win32/weos.exe
chmod +x build/win32/weos.exe
cd build/win32
zip -r ../../weos-win32.zip .
cd ../../
#setup windows 64 bit build
mkdir -p build/win64/apps/admin
cp api.yaml build/win64/api.yaml
cp README.md build/win64/README.md
cp LICENSE build/win64/LICENSE
cp NOTICE.txt build/win64/NOTICE.txt
cp weos-windows-4.0-amd64.exe build/win64/weos.exe
chmod +x build/win64/weos.exe
cd build/win64
zip -r ../../weos-win64.zip .
- uses: actions/upload-artifact@v2
with:
name: Mac OS
path: weos-mac-amd64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Linux 32 Bit
path: weos-linux-386.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Linux 64 Bit
path: weos-linux-amd64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Windows 32 Bit
path: weos-win32.zip
- uses: actions/upload-artifact@v2
with:
name: Windows 64 bit
path: weos-win64.zip
- name: Send release notification
uses: rtCamp/action-slack-notify@v2
env:
Expand Down
100 changes: 44 additions & 56 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
name: Release workflow

on:
workflow_dispatch:
inputs:
version:
description: Desired release tag (e.g. v1.2,v1.2-alpha,v1.2-RC1)
required: true
pre-release:
description: Is Pre-Release
required: true
default: "true"
push:
tags:
- "v*.*.*"

env:
SLACK_CHANNEL: weos
SLACK_USERNAME: WeOS API
SLACK_ICON: https://github.com/wepala.png?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: copyright 2021 Wepala
SLACK_FOOTER: copyright 2022 Wepala

jobs:
prep:
runs-on: ubuntu-latest
build-api:
name: Release Go Binaries
outputs:
today: ${{ steps.date.outputs.today }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -32,65 +27,67 @@ jobs:
go-version: 1.16.x
- name: Run unit tests
run: go test -v ./...
# - name: Run Postgres integration tests
# run: go test -v ./... -driver=postgres
# - name: Run Mysql integration tests
# run: go test -v ./... -driver=mysql
build-api:
name: Release Go Binaries
runs-on: ubuntu-latest
needs: prep
steps:
- uses: actions/checkout@v2
- name: Run Postgres projections tests
run: go test -v ./projections -driver=postgres
- name: Run Mysql projections tests
run: go test -v ./projections -driver=mysql
- uses: crazy-max/ghaction-xgo@v1
name: build linux and mac
with:
xgo_version: latest
go_version: 1.16.x
dest: build
dest: .
prefix: weos
targets: linux/386,linux/amd64,darwin/amd64,windows/386,windows/amd64
v: true
x: false
race: false
ldflags: -s -w
buildmode: default
tags: server
- name: setup app
run: |
ls -al build/*
#setup go tests
go install github.com/cucumber/godog/cmd/godog@latest
godog -t long
#setup mac build
mkdir -p build/mac
cp api.yaml build/mac/api.yaml
cp README.md build/mac/README.md
cp build/weos-darwin-10.12-amd64 build/mac/weos
cp LICENSE build/mac/LICENSE
cp NOTICE.txt build/mac/NOTICE.txt
cp weos-darwin-10.16-amd64 build/mac/weos
chmod +x build/mac/weos
tar -czf weos-mac-amd64.tar.gz -C build/mac .
#setup linux 32 bit build
mkdir -p build/linux32/apps/admin
cp api.yaml build/linux32/api.yaml
cp README.md build/linux32/README.md
cp build/weos-linux-386 build/linux32/weos
cp LICENSE build/linux32/LICENSE
cp NOTICE.txt build/linux32/NOTICE.txt
cp weos-linux-386 build/linux32/weos
chmod +x build/linux32/weos
tar -czf weos-linux-386.tar.gz -C build/linux32 .
#setup linux 64 bit build
mkdir -p build/linux64/apps/admin
cp api.yaml build/linux64/api.yaml
cp build/weos-linux-amd64 build/linux64/weos
cp README.md build/linux64/README.md
cp LICENSE build/linux64/LICENSE
cp NOTICE.txt build/linux64/NOTICE.txt
cp weos-linux-amd64 build/linux64/weos
chmod +x build/linux64/weos
tar -czf weos-linux-amd64.tar.gz -C build/linux64 .
#setup windows 32 bit build
mkdir -p build/win32/apps/admin
cp api.yaml build/win32/api.yaml
cp README.md build/win32/README.md
cp build/weos-windows-4.0-386.exe build/win32/weos.exe
cp dll/x86/* build/win32
cp LICENSE build/win32/LICENSE
cp NOTICE.txt build/win32/NOTICE.txt
cp weos-windows-4.0-386.exe build/win32/weos.exe
chmod +x build/win32/weos.exe
chmod +x build/win32/*.dll
cd build/win32
zip -r ../../weos-win32.zip .
cd ../../
Expand All @@ -99,36 +96,27 @@ jobs:
mkdir -p build/win64/apps/admin
cp api.yaml build/win64/api.yaml
cp README.md build/win64/README.md
cp build/weos-windows-4.0-amd64.exe build/win64/weos.exe
cp dll/x64/* build/win64
cp LICENSE build/win64/LICENSE
cp NOTICE.txt build/win64/NOTICE.txt
cp weos-windows-4.0-amd64.exe build/win64/weos.exe
chmod +x build/win64/weos.exe
chmod +x build/win64/*.dll
cd build/win64
zip -r ../../weos-win64.zip .
- uses: actions/upload-artifact@v2
with:
name: Mac OS
path: weos-mac-amd64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Linux 32 Bit
path: weos-linux-386.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Linux 64 Bit
path: weos-linux-amd64.tar.gz
- uses: actions/upload-artifact@v2
with:
name: Windows 32 Bit
path: weos-win32.zip
- uses: actions/upload-artifact@v2
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: Windows 64 bit
path: weos-win64.zip
files: |
weos-linux-386.tar.gz
weos-linux-amd64.tar.gz
weos-mac-amd64.tar.gz
weos-win32.zip
weos-win64.zip
LICENSE
generate_release_notes: true
- name: Send release notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: "FFFF00"
SLACK_MESSAGE: We were able to create a development build. Get the artifact here https://github.com/wepala/weos-api/actions/runs/${{ github.run_id }}
SLACK_TITLE: WeOS API Build Created
SLACK_MESSAGE: We were able to create a release. View the release at https://github.com/wepala/weos-service/releases
SLACK_TITLE: WeOS Build Created
4 changes: 4 additions & 0 deletions IntelMacDockerFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM sickcodes/docker-osx as mac



2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright [yyyy] [name of copyright owner]
Copyright 2022 Wepala LTD

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
Loading

0 comments on commit c089982

Please sign in to comment.