Skip to content

Commit 2709298

Browse files
authored
Create rubyonrails.yml
azure reasource manager Signed-off-by: Theomegas1 <[email protected]>
1 parent bf12eb7 commit 2709298

File tree

1 file changed

+79
-0
lines changed

1 file changed

+79
-0
lines changed

.github/workflows/rubyonrails.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
- name: Azure Resource Manager (ARM) Template Deployment
2+
# You may pin to the exact commit or the version.
3+
# uses: whiteducksoftware/azure-arm-action@9bae2e95df87dbd4acae11deb0765be7256fd141
4+
uses: whiteducksoftware/[email protected]
5+
with:
6+
# Paste output of `az ad sp create-for-rbac -o json` as value of secret variable: AZURE_CREDENTIALS
7+
creds:
8+
# Provide the name of a resource group.
9+
resourceGroupName:
10+
# Specify the path to the Azure Resource Manager template.
11+
templateLocation:
12+
# Specifies the name of the resource group deployment to create.
13+
deploymentName:
14+
# Incremental (only add resources to resource group) or Complete (remove extra resources from resource group).
15+
deploymentMode: # optional, default is Incremental
16+
# Specify either path to the Azure Resource Manager parameters file or pass them as 'key1=value1;key2=value2;...'.
17+
parameters: # optional
18+
# Specify either path to the Azure Resource Manager override parameters file or pass them as 'key1=value1;key2=value2;...'.
19+
overrideParameters: # optional
20+
# This workflow uses actions that are not certified by GitHub. They are
21+
# provided by a third-party and are governed by separate terms of service,
22+
# privacy policy, and support documentation.
23+
#
24+
# This workflow will install a prebuilt Ruby version, install dependencies, and
25+
# run tests and linters.
26+
name: "Ruby on Rails CI"
27+
on:
28+
push:
29+
branches: [ "main" ]
30+
pull_request:
31+
branches: [ "main" ]
32+
jobs:
33+
test:
34+
runs-on: ubuntu-latest
35+
services:
36+
postgres:
37+
image: postgres:11-alpine
38+
ports:
39+
- "5432:5432"
40+
env:
41+
POSTGRES_DB: rails_test
42+
POSTGRES_USER: rails
43+
POSTGRES_PASSWORD: password
44+
env:
45+
RAILS_ENV: test
46+
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
47+
steps:
48+
- name: Checkout code
49+
uses: actions/checkout@v4
50+
# Add or replace dependency steps here
51+
- name: Install Ruby and gems
52+
uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
53+
with:
54+
bundler-cache: true
55+
# Add or replace database setup steps here
56+
- name: Set up database schema
57+
run: bin/rails db:schema:load
58+
# Add or replace test runners here
59+
- name: Run tests
60+
run: bin/rake
61+
62+
lint:
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Checkout code
66+
uses: actions/checkout@v4
67+
- name: Install Ruby and gems
68+
uses: ruby/setup-ruby@78c01b705fd9d5ad960d432d3a0cfa341d50e410 # v1.179.1
69+
with:
70+
bundler-cache: true
71+
- name: Generate binstubs
72+
run: bundle binstubs bundler-audit brakeman rubocop
73+
# Add or replace any other lints here
74+
- name: Security audit dependencies
75+
run: bin/bundler-audit --update
76+
- name: Security audit application code
77+
run: bin/brakeman -q -w2
78+
- name: Lint Ruby files
79+
run: bin/rubocop --parallel

0 commit comments

Comments
 (0)