Skip to content

Dynniq EC-2

Dynniq EC-2 #707

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will run rspec
name: Dynniq EC-2
on:
pull_request:
types: [ labeled ]
schedule:
# schedule runs only on the default branch. time is in UTC.
# * is a special character in YAML so you have to quote this string.
# run every night at 3:45AM UTC.
- cron: '45 0 * * *'
jobs:
test:
if: ${{ github.event_name == 'schedule' || github.event.label.name == 'equipment' }}
runs-on: [ self-hosted, Windows, X64, ec2 ]
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
env:
ImageOS: win19
with:
ruby-version: 3.0
bundler-cache: true # runs 'bundle install' and caches installed gems
- name: Run tests
run: bundle exec rspec --format Validator::Brief --format Validator::Details --out log/validation.log spec/site/tlc
env:
SITE_CONFIG: config/dynniq_ec2.yaml
- name: Show detailed log
if: always()
run: cat log/validation.log
- name: Rename validation.log
if: always()
run: |
$date=Get-Date -Format 'yyyy-MM-dd_HH-mm'
mv log/validation.log log/validation_ec2_$date.log
- name: Upload validation.log
if: always()
uses: actions/upload-artifact@v3
with:
name: rspec validation
path: log/validation_ec2_*.log
- name: Get ec2 proxyapp.ini
if: always()
env:
USER: ${{ secrets.EC2_USER }}
PASSWD: ${{ secrets.EC2_PASSWD }}
IP: ${{ secrets.EC2_IP }}
run: |
Remove-Item Alias:curl
$remote_path='ftp://'+$env:IP+'/opt/D2/appl2/proxyapp.ini'
$credentials=$env:USER+':'+$env:PASSWD
curl -u $credentials $remote_path -o proxyapp.ini
- name: Upload ec2 proxyapp.ini
if: always()
uses: actions/upload-artifact@v3
with:
name: ec2 proxyapp.ini
path: proxyapp.ini