Secure cookies in production #1629
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: check | |
on: | |
- push | |
- pull_request | |
env: | |
RAILS_ENV: test | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: | |
postgres: | |
image: supabase/postgres:15.6.1.139 | |
env: | |
POSTGRES_PASSWORD: postgres | |
ports: | |
- 5432:5432 | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Set up Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: .node-version | |
cache: npm | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
cache: poetry | |
- name: Install Overmind | |
env: | |
OVERMIND_VERSION: 2.5.1 | |
run: | | |
sudo apt-get install tmux | |
sudo curl -Lo /usr/bin/overmind.gz https://github.com/DarthSim/overmind/releases/download/v${{ env.OVERMIND_VERSION }}/overmind-v${{ env.OVERMIND_VERSION }}-linux-amd64.gz | |
sudo gzip -d /usr/bin/overmind.gz | |
sudo chmod u+x /usr/bin/overmind | |
sudo chown $(whoami) /usr/bin/overmind | |
- name: Set up environment | |
run: bin/setup | |
env: | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
- name: Scan for common Rails security vulnerabilities using static analysis | |
run: bundle exec brakeman --no-pager | |
- name: Check lints and formatting | |
run: bin/check --all-files | |
- name: Run tests | |
run: bin/test | |
env: | |
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }} | |
- name: Keep screenshots from failed system tests | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: screenshots | |
path: ${{ github.workspace }}/tmp/screenshots | |
if-no-files-found: ignore |