FOPTS-5505 Fixed consumption calculation for ITAM Overused Licenses #6039
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: 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: | |
- name: Check out Github repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 100 # https://github.com/danger/danger/issues/913 | |
- name: Download/Install fpt | |
run: | | |
curl -O https://binaries.rightscale.com/rsbin/fpt/v1.5.0/fpt-linux-amd64.tgz | |
tar xvzf fpt-linux-amd64.tgz | |
mv fpt fpt-download | |
mv fpt-download/fpt . | |
rm -rf fpt-linux-amd64.tgz fpt-download | |
- name: Install node.js libraries | |
shell: bash -l {0} # https://github.com/actions/virtual-environments/issues/4 | |
run: | | |
nvm install | |
nvm use | |
npm install | |
- name: Install Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12.5 | |
cache: 'pip' # caching pip dependencies | |
- name: Install Python libraries | |
run: pip install -r requirements.txt | |
- name: Install Ruby | |
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: Install Ruby libraries | |
shell: bash -l {0} # https://github.com/actions/virtual-environments/issues/4 | |
run: bundle install --without documentation --path bundle | |
- name: Install Aspell | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y aspell | |
- 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 }} | |