Skip to content

Commit 8d19b5d

Browse files
committed
chore: Ruby 3.3 floor, modern GHA, add test workflow
1 parent cf58261 commit 8d19b5d

6 files changed

Lines changed: 47 additions & 99 deletions

File tree

.github/dependabot.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: "/"
5+
schedule:
6+
interval: weekly
7+
- package-ecosystem: bundler
8+
directory: "/"
9+
schedule:
10+
interval: weekly

.github/workflows/manual-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
runs-on: ubuntu-latest
2626
steps:
2727
- name: clone it
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v7
2929
with:
3030
submodules: true
3131

@@ -39,7 +39,7 @@ jobs:
3939
echo "API_TAG_NAME=$API_TAG_NAME" >> ${GITHUB_ENV}
4040
4141
- name: make new release
42-
uses: softprops/action-gh-release@v0.1.7
42+
uses: softprops/action-gh-release@v3
4343
with:
4444
token: ${{ env.GITHUB_PUSH_TOKEN }}
4545
tag_name: ${{env.API_TAG_NAME}}

.github/workflows/on-api-release.yml

Lines changed: 3 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
build-release:
1515
runs-on: ubuntu-latest
1616
# id=68949242 => interscript-ci user
17-
if: ${{ github.event.release.author.id == 68949242 }} #contains(github.event.release.body, '#releaseed-by-ci')
17+
if: ${{ github.event.release.author.id == 68949242 }}
1818
steps:
19-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v7
2020
- name: setup env vars
2121
run: |
2222
RELEASE_BODY="${{github.event.release.body}}"
@@ -45,7 +45,7 @@ jobs:
4545
buildargs: INTERSCRIPT_GEM_VERSION
4646

4747
- name: dispatch "infrastructure-lambda-api"
48-
uses: peter-evans/repository-dispatch@v1
48+
uses: peter-evans/repository-dispatch@v4
4949
with:
5050
token: ${{ env.GITHUB_PUSH_TOKEN }}
5151
repository: interscript/infrastructure-lambda-api
@@ -55,88 +55,3 @@ jobs:
5555
"workflow": "publish-ecr.yml",
5656
"api_tag_name": "${{env.RELEASE_TAG_NAME}}"
5757
}
58-
59-
# - name: setup-aws-credentials
60-
# uses: aws-actions/configure-aws-credentials@v1
61-
# with:
62-
# aws-access-key-id: ${{ env.AWS_ACCESS_KEY_ID }}
63-
# aws-secret-access-key: ${{ env.AWS_SECRET_ACCESS_KEY }}
64-
# aws-region: us-east-1
65-
#
66-
# - name: ecr-login
67-
# id: login-ecr
68-
# uses: aws-actions/amazon-ecr-login@v1
69-
#
70-
# - name: push to ecr
71-
# env:
72-
# ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
73-
# working-directory: .github/lambda
74-
# run: |
75-
# docker build -t $ECR_REGISTRY/interscript-api:${{env.RELEASE_TAG_NAME}} .
76-
# docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{env.RELEASE_TAG_NAME}}
77-
78-
79-
80-
81-
# - name: push to github package
82-
# uses: elgohr/Publish-Docker-Github-Action@master
83-
# with:
84-
# workdir: .github/lambda
85-
# dockerfile: Dockerfile
86-
# tags: "latest,${{env.RELEASE_TAG_NAME}}"
87-
# registry: ""
88-
# name: "awslambda-interscript-api"
89-
# username: "${{env.AWS_ACCESS_KEY_ID}}"
90-
# password: "${{env.}}"
91-
# buildargs: INTERSCRIPT_GEM_VERSION
92-
93-
# - name: login github package
94-
# uses: docker/login-action@v1
95-
# with:
96-
# username: ${{ secrets.DOCKERHUB_USERNAME }}
97-
# password: ${{ secrets.DOCKERHUB_TOKEN }}
98-
# - name: build and push
99-
# id: docker_build
100-
# uses: docker/build-push-action@v2
101-
# with:
102-
# push: true
103-
# tags: user/app:latest
104-
105-
# - name: setup ruby+install
106-
# uses: ruby/setup-ruby@v1.75.0
107-
# with:
108-
# bundler-cache: false
109-
# ruby-version: 2.7
110-
111-
# - name: build "-api" source
112-
# working-directory: git
113-
# run: |
114-
# cp Gemfile* lib/
115-
# zip -r ${AWSL_SRC_ZIP} lib
116-
117-
# - name: build "-layer"
118-
# working-directory: git/.github/awsl-layer-docker
119-
# run: |
120-
# ls -all
121-
# bash build.sh
122-
# cp libs.zip $AWSL_LAYER_ZIP
123-
124-
# - name: upload lambda layer to current release
125-
# uses: softprops/action-gh-release@v1
126-
# with:
127-
# tag_name: ${{env.RELEASE_TAG_NAME}}
128-
# files: |
129-
# ${{env.AWSL_SRC_ZIP}}
130-
# ${{env.AWSL_LAYER_ZIP}}
131-
132-
# - name: dispatch "infrastructure-lambda-api"
133-
# uses: peter-evans/repository-dispatch@v1
134-
# with:
135-
# token: ${{ env.GITHUB_PUSH_TOKEN }}
136-
# repository: interscript/infrastructure-lambda-api
137-
# event-type: ${{ github.repository }}
138-
# client-payload: >-
139-
# {
140-
# "workflow": "on-api-release.yml",
141-
# "api_tag_name": "${{env.RELEASE_TAG_NAME}}"
142-
# }

.github/workflows/test.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
jobs:
9+
rspec:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
ruby: ["3.3", "3.4"]
15+
env:
16+
INTERSCRIPT_GEM_VERSION: "0.1.9"
17+
steps:
18+
- uses: actions/checkout@v7
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: ${{ matrix.ruby }}
22+
bundler-cache: true
23+
- run: bundle exec rspec

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7
1+
3.3.8

Gemfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
source "https://rubygems.org"
22

3-
ruby RUBY_VERSION
3+
ruby ">= 3.3.0"
44

5-
gem "graphql", "~>1.9"
5+
gem "graphql", "~> 1.13"
66

7-
unless ENV['INTERSCRIPT_GEM_VERSION'].empty? then
8-
gem "interscript", ENV['INTERSCRIPT_GEM_VERSION']
7+
if ENV["INTERSCRIPT_GEM_VERSION"] && !ENV["INTERSCRIPT_GEM_VERSION"].empty?
8+
gem "interscript", ENV["INTERSCRIPT_GEM_VERSION"]
99
else
1010
gem "interscript", "0.1.9"
1111
end
1212

13-
group :development do
13+
gem "rababa", "~> 0.1.1"
14+
15+
group :development, :test do
1416
gem "rake"
15-
gem "rspec"
17+
gem "rspec", "~> 3.13"
1618
end
17-
18-
gem 'rababa', '~> 0.1.1'

0 commit comments

Comments
 (0)