Pre-release #14
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
name: Pre-release | |
on: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Build | |
# https://github.com/actions/virtual-environments/ | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v3 | |
# https://github.com/marketplace/actions/setup-go-environment | |
- name: 🔧 Setup go | |
uses: actions/setup-go@v4 | |
with: | |
go-version-file: 'gcosts/go.mod' | |
cache-dependency-path: 'gcosts/go.sum' | |
- name: 🍳 Build gcosts | |
run: cd gcosts && make | |
# Test binary | |
- name: 🌡️ Test gcosts | |
run: cd gcosts && ./gcosts help | |
- name: 🌡️ Test gcosts region | |
run: cd gcosts && ./gcosts region -p ../pricing.yml | |
- name: 🌡️ Test gcosts compute instance | |
run: cd gcosts && ./gcosts compute instance -p ../pricing.yml | |
# Test gcosts calc with pricing.yml | |
- name: 🌡️ Test gcosts calc | |
run: | | |
cd t && \ | |
./../gcosts/gcosts calc -p ../pricing.yml && \ | |
bash test.sh | |
# Upload binaries | |
# https://github.com/marketplace/actions/upload-a-build-artifact | |
- name: 📤 Upload | |
uses: actions/upload-artifact@v3 | |
with: | |
name: gcosts-artifact | |
path: gcosts/gcosts-* | |
retention-days: 1 | |
test-linux: | |
name: Test Linux | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v3 | |
# Download binaries | |
# https://github.com/marketplace/actions/download-a-build-artifact | |
- name: 📥 Download | |
uses: actions/download-artifact@v3 | |
with: | |
name: gcosts-artifact | |
# Test binary | |
- name: 🌡️ Test | |
run: chmod +x gcosts-linux-x86_64 && ./gcosts-linux-x86_64 help | |
test-macos: | |
name: Test macOS | |
needs: build | |
runs-on: macos-latest | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v3 | |
- name: 📥 Download | |
uses: actions/download-artifact@v3 | |
with: | |
name: gcosts-artifact | |
# Test binary | |
- name: 🌡️ Test | |
run: chmod +x gcosts-macos-x86_64 && ./gcosts-macos-x86_64 help | |
test-windows: | |
name: Test Windows | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- name: 🛎️ Checkout | |
uses: actions/checkout@v3 | |
- name: 📥 Download | |
uses: actions/download-artifact@v3 | |
with: | |
name: gcosts-artifact | |
# Test binary | |
- name: 🌡️ Test | |
run: .\gcosts-windows-x86_64.exe help |