Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CI job for testing against the starter repo #73

Merged
merged 69 commits into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
195b958
Add CI job for testing against the starter repo
jagthedrummer Nov 17, 2023
fe30c5c
need to use env
jagthedrummer Nov 17, 2023
23a5c8b
set a working directory
jagthedrummer Nov 17, 2023
640cba7
need to make the tmp dir
jagthedrummer Nov 17, 2023
914d89f
target the scrip from within the tmp dir
jagthedrummer Nov 17, 2023
02f4ce0
try to link jbuilder-schema
jagthedrummer Nov 17, 2023
318707a
can't update while core gems are pinned to a specific version
jagthedrummer Nov 17, 2023
83e534e
checkout core
jagthedrummer Nov 17, 2023
28b9913
try linking core gems
jagthedrummer Nov 17, 2023
fa66c6d
don't seem to be looking for the right branch
jagthedrummer Nov 17, 2023
803da81
not getting the right branch name
jagthedrummer Nov 17, 2023
dda8490
add services and try running tests
jagthedrummer Nov 17, 2023
4e0d667
try thi
jagthedrummer Nov 17, 2023
d488a30
hmmm
jagthedrummer Nov 17, 2023
ac8d1e1
need to bundle install
jagthedrummer Nov 17, 2023
f24d2eb
setup up a matrix to split the test suite
jagthedrummer Nov 17, 2023
93ed67a
try this
jagthedrummer Nov 17, 2023
c7cfa2e
wth
jagthedrummer Nov 17, 2023
2755570
try extracting some of this to an action
jagthedrummer Nov 17, 2023
8e8b806
try this
jagthedrummer Nov 17, 2023
f5a10f7
maybe this
jagthedrummer Nov 17, 2023
280ffe3
hmmm
jagthedrummer Nov 17, 2023
ce70050
maybe this
jagthedrummer Nov 17, 2023
66bd23c
maybe this
jagthedrummer Nov 17, 2023
742e330
extract more stuff'
jagthedrummer Nov 17, 2023
97c44f3
oops
jagthedrummer Nov 17, 2023
d845a61
try to target the right directory
jagthedrummer Nov 17, 2023
c34f77c
debug
jagthedrummer Nov 17, 2023
1c27f4b
oops
jagthedrummer Nov 17, 2023
ebe3348
consolidating
jagthedrummer Nov 17, 2023
38521d8
more consolidation
jagthedrummer Nov 17, 2023
279aca6
wat
jagthedrummer Nov 17, 2023
94ac6ec
derp
jagthedrummer Nov 17, 2023
f87e445
more extraction
jagthedrummer Nov 17, 2023
42203cb
inching forward
jagthedrummer Nov 17, 2023
7711752
fix
jagthedrummer Nov 17, 2023
abb1857
more progress
jagthedrummer Nov 17, 2023
9470292
this should work in a generic way
jagthedrummer Nov 17, 2023
28c2300
update the lock file
jagthedrummer Nov 17, 2023
49797db
make sure we update the lock file
jagthedrummer Nov 17, 2023
b641ef0
guess that's not gonna work...
jagthedrummer Nov 17, 2023
069da93
a little cleanup, and a stopping point for the day
jagthedrummer Nov 17, 2023
557919b
a little clean up
jagthedrummer Nov 20, 2023
1345920
oops
jagthedrummer Nov 20, 2023
32a524f
cmon
jagthedrummer Nov 20, 2023
acbb3bb
more cleanup
jagthedrummer Nov 20, 2023
f2a1f59
need to actually use the branch we find
jagthedrummer Nov 20, 2023
16e96bb
do we need to manually create the dir?
jagthedrummer Nov 20, 2023
2769ba8
clean up
jagthedrummer Nov 20, 2023
3462a98
remove unused stuff
jagthedrummer Nov 20, 2023
95f010f
more clean up
jagthedrummer Nov 20, 2023
87ad118
oops
jagthedrummer Nov 20, 2023
8e1406b
how'd this get in there
jagthedrummer Nov 20, 2023
fe87585
more clean up
jagthedrummer Nov 20, 2023
c0532e5
more clean up
jagthedrummer Nov 20, 2023
fad0b47
more clean up
jagthedrummer Nov 20, 2023
943b4e3
get things in the right order
jagthedrummer Nov 20, 2023
ba41bc3
maybe this
jagthedrummer Nov 20, 2023
c8cbc11
this seems to cause problems
jagthedrummer Nov 20, 2023
e291b42
try this
jagthedrummer Nov 20, 2023
05c4e7c
maybe now?
jagthedrummer Nov 20, 2023
95a75a2
try using an external action
jagthedrummer Nov 20, 2023
2bb0dbf
that worked
jagthedrummer Nov 20, 2023
a5e0637
delete unused action since we now have it externally available
jagthedrummer Nov 20, 2023
c3b0ce5
try another external action
jagthedrummer Nov 20, 2023
f65ace7
another external workflow
jagthedrummer Nov 20, 2023
9790425
more clean up
jagthedrummer Nov 20, 2023
7c3457e
A little more clean up
jagthedrummer Nov 20, 2023
bdf3862
Version bump
newstler Dec 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
107 changes: 107 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,110 @@ jobs:
bundler-cache: true
- name: Run Standard
run: bundle exec rake standard

starter_repo:
runs-on: ubuntu-latest
name: Bullet Train Starter Repo Minitest
strategy:
fail-fast: false
matrix:
# Set identifiers for parallel jobs. These can be anything.
# For instance if you want a Three Amigos themed pipeline you could use:
# ci_node_index: [Dusty, Ned, Lucky]
ci_node_index: [1,2,3,4]
services:
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis
ports:
- "6379:6379"
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
BUNDLE_JOBS: 2
BUNDLE_RETRY: 3
steps:
- name: Checkout This Repo
uses: actions/checkout@v4

- name: Checkout Starter Repo
uses: bullet-train-co/checkout-repo-with-matching-branch@v1
with:
target_dir: tmp/starter
repository: bullet-train-co/bullet_train

- name: Checkout Core Repo
uses: bullet-train-co/checkout-repo-with-matching-branch@v1
with:
target_dir: tmp/core
repository: bullet-train-co/bullet_train-core

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
working-directory: tmp/starter
bundler-cache: true

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version-file: tmp/starter/.nvmrc
cache: 'yarn'
cache-dependency-path: tmp/starter/yarn.lock

- name: Link This Repo
uses: bullet-train-co/link-local-gem@v1
with:
application_dir: tmp/starter
local_gem_dir: .

- name: Link Core Repo
uses: bullet-train-co/link-core-gems@v1
with:
application_dir: tmp/starter
core_dir: tmp/core

- name: Set up database schema
run: bin/rails db:schema:load
working-directory: ./tmp/starter

- name: Run Tests
id: run-tests
env:
# Specifies how many jobs you would like to run in parallel,
# used for partitioning
CI_NODE_TOTAL: ${{ strategy.job-total }}
# Use the index from matrix as an environment variable
CI_NODE_INDEX: ${{ strategy.job-index }}
continue-on-error: false
run : bin/parallel-ci
working-directory: ./tmp/starter

- name: Test Summary
uses: test-summary/action@v2
with:
paths: "tmp/starter/test/reports/**/TEST-*.xml"
#output: test-summary.md
if: always()



2 changes: 1 addition & 1 deletion lib/jbuilder/schema/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# We can't use the standard `Jbuilder::Schema::VERSION =` because
# `Jbuilder` isn't a regular module namespace, but a class …which also loads Active Support.
# So we use trickery, and assign the proper version once `jbuilder/schema.rb` is loaded.
JBUILDER_SCHEMA_VERSION = "2.6.6"
JBUILDER_SCHEMA_VERSION = "2.6.7"