Specs failing when it tests file writing on tmp folder

I’m trying to set Github Actions as my project’s CI tool running Ruby 2.7, Rails 6 and Rspec. Everything works fine except by the specs which has to write files and test it creation and contents.

Probably GithubAction’ containers does not allow writing, so any suggestion for how could I make it please?

Failure/Error: 582 File.open(“tmp/#{@remittance.file_name}”, “w”) do |file| 583 create_header(file) 584 create_body(file) 585 create_footer(file) 586 end 587 588 Errno::ENOENT: 589 No such file or directory @ rb_sysopen - tmp/201909171.rem

I notice this is a relative path, so whether writing is allowed will depend on relative to where. Although it could simply be that the tmp/ directory doesn’t exist on the runner.

Thank you, this question was also relevant to me.