Skip to content

POL-577 Add Instance Cost Per Hour (Azure) #3565

POL-577 Add Instance Cost Per Hour (Azure)

POL-577 Add Instance Cost Per Hour (Azure) #3565

name: Test Policies
on:
push:
branches:
- master
pull_request:
branches:
- master
# Workflow dispatch trigger allows manually running workflow
workflow_dispatch:
branches:
- master
jobs:
policy_test:
name: "Policy Test"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 100 # https://github.com/danger/danger/issues/913
- uses: actions/setup-go@v4
- run: |
mkdir -p tmp
git clone https://github.com/flexera-public/policy_sdk tmp/policy_sdk
cd tmp/policy_sdk/cmd/fpt
go build -o ../../../../fpt
rm -rf tmp
- uses: actions/setup-python@v5
with:
python-version: 3.10.12
cache: 'pip' # caching pip dependencies
- run: pip install -r .pip_requirements
- uses: ruby/setup-ruby@v1
with:
# ruby-version: 2.4.1 # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Configure Testing Environment
shell: bash -l {0} # https://github.com/actions/virtual-environments/issues/4
run: |
nvm install
nvm use
npm install
bundle install --without documentation --path bundle
- name: Run Tests
shell: bash -l {0} # https://github.com/actions/virtual-environments/issues/4
run: |
bundle exec danger --verbose
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
FPT_LOGIN_ACCOUNT_HOST: ${{ secrets.FPT_LOGIN_ACCOUNT_HOST }}
FPT_LOGIN_ACCOUNT_ID: ${{ secrets.FPT_LOGIN_ACCOUNT_ID }}
FPT_LOGIN_ACCOUNT_REFRESH_TOKEN: ${{ secrets.FPT_LOGIN_ACCOUNT_REFRESH_TOKEN }}