-
Notifications
You must be signed in to change notification settings - Fork 32
66 lines (62 loc) · 2.17 KB
/
test-policies.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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 }}