File tree Expand file tree Collapse file tree 16 files changed +292
-202
lines changed
Expand file tree Collapse file tree 16 files changed +292
-202
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ name : Build Documentation
2+ description : ' Build Documentation.'
3+
4+ runs :
5+ using : composite
6+ steps :
7+ - name : Build Documentation
8+ shell : bash
9+ run : cd docs && make html
Original file line number Diff line number Diff line change 1+ name : CI Workflow
2+ description : ' Shared CI workflow.'
3+ inputs :
4+ ruby-version :
5+ description : ' The version of ruby to setup and run'
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ - uses : ruby/setup-ruby@v1
12+ with :
13+ ruby-version : ${{ inputs.ruby-version }}
14+ bundler : 2.2.33
15+
16+ - name : Install dependencies
17+ shell : bash
18+ run : bundle _2.2.33_ install
19+
20+ - name : Skip flaky tests for jruby
21+ if : ${{ startsWith(inputs.ruby-version, 'jruby') }}
22+ shell : bash
23+ run : echo "SPEC_TAGS=-t '~flaky'" >> $GITHUB_ENV
24+
25+ - name : Run tests
26+ shell : bash
27+ run : bundle _2.2.33_ exec rspec spec $SPEC_TAGS
28+
29+ - name : Run RuboCop
30+ shell : bash
31+ run : bundle exec rubocop --parallel
32+
33+ - name : Run contract tests
34+ if : ${{ !startsWith(inputs.ruby-version, 'jruby') }}
35+ shell : bash
36+ run : make contract-tests
Original file line number Diff line number Diff line change 1+ name : Publish Documentation
2+ description : ' Publish the documentation to GitHub Pages'
3+ inputs :
4+ token :
5+ description : ' Token to use for publishing.'
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ -
uses :
launchdarkly/gh-actions/actions/[email protected] 12+ name : ' Publish to Github pages'
13+ with :
14+ docs_path : docs/build/html/
15+ github_token : ${{inputs.token}} # For the shared action the token should be a GITHUB_TOKEN<
Original file line number Diff line number Diff line change 1+ name : Publish Package
2+ description : ' Publish the package to rubygems'
3+ inputs :
4+ dry_run :
5+ description : ' Is this a dry run. If so no package will be published.'
6+ required : true
7+
8+ runs :
9+ using : composite
10+ steps :
11+ - name : Build gemspec
12+ shell : bash
13+ run : gem build ld-eventsource.gemspec
14+
15+ - name : Publish Library
16+ shell : bash
17+ if : ${{ inputs.dry_run == 'false' }}
18+ run : gem push ld-eventsource-*.gem
Original file line number Diff line number Diff line change 1+ name : Run CI
2+ on :
3+ push :
4+ branches : [ 7.x ]
5+ paths-ignore :
6+ - ' **.md' # Do not need to run CI for markdown changes.
7+ pull_request :
8+ branches : [ 7.x ]
9+ paths-ignore :
10+ - ' **.md'
11+
12+ jobs :
13+ build-linux :
14+ runs-on : ubuntu-latest
15+
16+ env :
17+ LD_SKIP_DATABASE_TESTS : 0
18+
19+ strategy :
20+ matrix :
21+ ruby-version :
22+ - ' 2.7'
23+ - ' 3.0'
24+ - ' 3.1'
25+ - ' 3.2'
26+ - jruby-9.4
27+
28+ services :
29+ redis :
30+ image : redis
31+ ports :
32+ - 6379:6379
33+ dynamodb :
34+ image : amazon/dynamodb-local
35+ ports :
36+ - 8000:8000
37+ consul :
38+ image : hashicorp/consul
39+ ports :
40+ - 8500:8500
41+
42+ steps :
43+ - uses : actions/checkout@v4
44+ with :
45+ fetch-depth : 0 # If you only need the current version keep this.
46+
47+ - uses : ./.github/actions/ci
48+ with :
49+ ruby-version : ${{ matrix.ruby-version }}
50+
51+ - uses : ./.github/actions/build-docs
52+ if : ${{ !startsWith(matrix.ruby-version, 'jruby') }}
53+
54+ build-windows :
55+ runs-on : windows-latest
56+
57+ env :
58+ LD_SKIP_DATABASE_TESTS : 1
59+
60+ defaults :
61+ run :
62+ shell : powershell
63+
64+ steps :
65+ - uses : actions/checkout@v4
66+
67+ - uses : ruby/setup-ruby@v1
68+ with :
69+ ruby-version : 2.7
70+ bundler : 2.2.33
71+
72+ - name : Install dependencies
73+ run : bundle _2.2.33_ install
74+
75+ - name : Run tests
76+ run : bundle _2.2.33_ exec rspec spec
Original file line number Diff line number Diff line change 1+ name : Lint PR title
2+
3+ on :
4+ pull_request_target :
5+ types :
6+ - opened
7+ - edited
8+ - synchronize
9+
10+ jobs :
11+ lint-pr-title :
12+ uses : launchdarkly/gh-actions/.github/workflows/lint-pr-title.yml@main
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_dispatch :
3+
4+ name : Publish Documentation
5+ jobs :
6+ build-publish-docs :
7+ runs-on : ubuntu-latest
8+ permissions :
9+ id-token : write # Needed if using OIDC to get release secrets.
10+ contents : write # Needed in this case to write github pages.
11+ steps :
12+ - uses : actions/checkout@v4
13+
14+ - uses : ruby/setup-ruby@v1
15+ with :
16+ ruby-version : 2.7
17+ bundler : 2.2.33
18+
19+ - uses : ./.github/actions/build-docs
20+
21+ - uses : ./.github/actions/publish-docs
22+ with :
23+ token : ${{secrets.GITHUB_TOKEN}}
Original file line number Diff line number Diff line change 1+ name : Publish Package
2+ on :
3+ workflow_dispatch :
4+ inputs :
5+ dry_run :
6+ description : ' Is this a dry run. If so no package will be published.'
7+ type : boolean
8+ required : true
9+
10+ jobs :
11+ build-publish :
12+ runs-on : ubuntu-latest
13+ # Needed to get tokens during publishing.
14+ permissions :
15+ id-token : write
16+ contents : read
17+ steps :
18+ - uses : actions/checkout@v4
19+
20+ -
uses :
launchdarkly/gh-actions/actions/[email protected] 21+ name : ' Get rubygems API key'
22+ with :
23+ aws_assume_role : ${{ vars.AWS_ROLE_ARN }}
24+ ssm_parameter_pairs : ' /production/common/releasing/rubygems/api_key = GEM_HOST_API_KEY'
25+
26+ - id : build-and-test
27+ name : Build and Test
28+ uses : ./.github/actions/ci
29+ with :
30+ ruby-version : 2.7
31+
32+ - id : publish
33+ name : Publish Package
34+ uses : ./.github/actions/publish
35+ with :
36+ dry_run : ${{ inputs.dry_run }}
You can’t perform that action at this time.
0 commit comments