-
Notifications
You must be signed in to change notification settings - Fork 17
73 lines (72 loc) · 2.28 KB
/
Copy pathcriteo-cookbooks-ci.yml
File metadata and controls
73 lines (72 loc) · 2.28 KB
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
66
67
68
69
70
71
72
73
# This is a basic workflow to help you get started with Actions
name: Criteo Cookbooks CI
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
tags: [ 'v*' ]
pull_request:
branches: [ master ]
jobs:
cookstyle:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.6
bundler-cache: true
- name: Run Cookstyle
run: bundle exec cookstyle --display-cop-names --extra-details
rspec:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.6
bundler-cache: true
- name: Run RSpec
run: bundle exec rspec
kitchen:
needs: [rspec]
runs-on: ubuntu-latest
strategy:
matrix:
windows_version: ['windows-2012r2', 'windows-2016', 'windows-2019', 'windows-2022']
# dotnet3 use some hacks that are not available on CI
dotnet_version: ['dotnet4']
steps:
- uses: shimataro/ssh-key-action@v2
with:
key: ${{secrets.AWS_SSH_PRIVATE_KEY}}
known_hosts: unnecessary
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.6
bundler-cache: true
- run: bundle exec kitchen test ${{ matrix.dotnet_version }}-${{ matrix.windows_version }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_REGION: ${{ secrets.AWS_REGION }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_SSH_KEY_ID: ${{ secrets.AWS_SSH_KEY_ID }}
AWS_SUBNET: ${{ secrets.AWS_SUBNET }}
AWS_SECURITY_GROUP: ${{ secrets.AWS_SECURITY_GROUP }}
supermarket:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
needs: [kitchen]
steps:
- uses: actions/checkout@v2
- name: Publish to supermarket
uses: afaundez/chef-supermarket-action@8cdbe1cccbe1ecd8685b2ea8f48780135bae7cee
with:
user: criteo
cookbook: ms_dotnet
category: Utilities
env:
SUPERMARKET_API_KEY: ${{ secrets.SUPERMARKET_API_KEY }}