This commit is contained in:
55
.github/workflows/main.yml
vendored
55
.github/workflows/main.yml
vendored
@@ -7,48 +7,17 @@ on:
|
|||||||
branches: [ master, develop, main ]
|
branches: [ master, develop, main ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
container-test-job:
|
||||||
# services:
|
|
||||||
# db:
|
|
||||||
# image: postgres:11
|
|
||||||
# ports: ['5432:5432']
|
|
||||||
#
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: node:18
|
||||||
|
env:
|
||||||
|
NODE_ENV: development
|
||||||
|
ports:
|
||||||
|
- 80
|
||||||
|
volumes:
|
||||||
|
- my_docker_volume:/volume_mount
|
||||||
|
options: --cpus 1
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Check for dockerenv file
|
||||||
- name: Setup Ruby
|
run: (ls /.dockerenv && echo Found dockerenv) || (echo No dockerenv)
|
||||||
uses: ruby/setup-ruby@v1.171.0
|
|
||||||
with:
|
|
||||||
ruby-version: 3.3.0
|
|
||||||
self-hosted: true
|
|
||||||
|
|
||||||
- uses: Borales/actions-yarn@v2.3.0
|
|
||||||
with:
|
|
||||||
cmd: install
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: |
|
|
||||||
# sudo apt install -yqq libpq-dev
|
|
||||||
gem install bundler
|
|
||||||
|
|
||||||
- name: Install Gems
|
|
||||||
run: |
|
|
||||||
bundle install
|
|
||||||
|
|
||||||
- name: Prepare Database
|
|
||||||
run: |
|
|
||||||
bundle exec rails db:prepare
|
|
||||||
|
|
||||||
- name: Run Tests
|
|
||||||
# env:
|
|
||||||
# DATABASE_URL: postgres://postgres:@localhost:5432/databasename
|
|
||||||
# RAILS_MASTER_KEY: ${{secrets.RAILS_MASTER_KEY}}
|
|
||||||
run: |
|
|
||||||
bundle exec rails test
|
|
||||||
|
|
||||||
- name: Create Coverage Artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: code-coverage
|
|
||||||
path: coverage/
|
|
||||||
Reference in New Issue
Block a user