mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
Cache deps for static analysis tools (#654)
This commit is contained in:
31
.github/workflows/ci.yml
vendored
31
.github/workflows/ci.yml
vendored
@@ -36,11 +36,14 @@ jobs:
|
||||
with:
|
||||
ruby-version: '2.7'
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.9'
|
||||
- uses: erlef/setup-beam@v1
|
||||
with:
|
||||
otp-version: '25.0'
|
||||
elixir-version: '1.13.4'
|
||||
- uses: actions/cache@v2
|
||||
name: Setup Elixir cache
|
||||
with:
|
||||
path: |
|
||||
deps
|
||||
@@ -48,8 +51,29 @@ jobs:
|
||||
key: ${{ runner.os }}-mix-${{ hashFiles('**/mix.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-mix-
|
||||
- name: Install Dependencies
|
||||
- uses: actions/cache@v2
|
||||
name: Setup ruby cache
|
||||
with:
|
||||
path: vendor/bundle
|
||||
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gems-
|
||||
- uses: actions/cache@v2
|
||||
name: Setup Python cache
|
||||
with:
|
||||
path: ~/.cache/pip
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-pip-
|
||||
- name: Install Elixir Dependencies
|
||||
run: mix deps.get --only dev
|
||||
- name: Install Ruby Dependencies
|
||||
run: |
|
||||
bundle config path vendor/bundle
|
||||
bundle install --jobs 4 --retry 3
|
||||
- name: Install Python Dependencies
|
||||
run: |
|
||||
pip install -r requirements.txt
|
||||
# Don't cache PLTs based on mix.lock hash, as Dialyzer can incrementally update even old ones
|
||||
# Cache key based on Elixir & Erlang version (also usefull when running in matrix)
|
||||
- name: Restore PLT cache
|
||||
@@ -66,9 +90,8 @@ jobs:
|
||||
- name: Create PLTs
|
||||
if: steps.plt_cache.outputs.cache-hit != 'true'
|
||||
run: mix dialyzer --plt
|
||||
- run: |
|
||||
gem install rubocop
|
||||
pip install pre-commit
|
||||
- name: Run pre-commit
|
||||
run: |
|
||||
pre-commit install
|
||||
SKIP=no-commit-to-branch pre-commit run --all-files
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ repos:
|
||||
files: \.ex$
|
||||
- id: rubocop
|
||||
name: 'ruby: rubocop'
|
||||
entry: rubocop
|
||||
entry: bundle exec rubocop
|
||||
language: system
|
||||
pass_filenames: false
|
||||
files: \.rb$
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
AllCops:
|
||||
TargetRubyVersion: 2.7
|
||||
Exclude:
|
||||
- "vendor/**/*"
|
||||
- "apps/fz_http/assets/node_modules/**/*"
|
||||
- "omnibus/cookbooks/firezone/attributes/default.rb"
|
||||
|
||||
@@ -3,4 +3,7 @@
|
||||
nodejs 14.19.3
|
||||
elixir 1.13.4-otp-25
|
||||
erlang 25.0
|
||||
|
||||
# Used for static analysis
|
||||
ruby 2.7.5
|
||||
python 3.9.13
|
||||
|
||||
5
Gemfile
Normal file
5
Gemfile
Normal file
@@ -0,0 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
gem 'rubocop'
|
||||
32
Gemfile.lock
Normal file
32
Gemfile.lock
Normal file
@@ -0,0 +1,32 @@
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
ast (2.4.2)
|
||||
parallel (1.22.1)
|
||||
parser (3.1.2.0)
|
||||
ast (~> 2.4.1)
|
||||
rainbow (3.1.1)
|
||||
regexp_parser (2.4.0)
|
||||
rexml (3.2.5)
|
||||
rubocop (1.30.0)
|
||||
parallel (~> 1.10)
|
||||
parser (>= 3.1.0.0)
|
||||
rainbow (>= 2.2.2, < 4.0)
|
||||
regexp_parser (>= 1.8, < 3.0)
|
||||
rexml (>= 3.2.5, < 4.0)
|
||||
rubocop-ast (>= 1.18.0, < 2.0)
|
||||
ruby-progressbar (~> 1.7)
|
||||
unicode-display_width (>= 1.4.0, < 3.0)
|
||||
rubocop-ast (1.18.0)
|
||||
parser (>= 3.1.1.0)
|
||||
ruby-progressbar (1.11.0)
|
||||
unicode-display_width (2.1.0)
|
||||
|
||||
PLATFORMS
|
||||
ruby
|
||||
|
||||
DEPENDENCIES
|
||||
rubocop
|
||||
|
||||
BUNDLED WITH
|
||||
2.1.4
|
||||
1
requirements.txt
Normal file
1
requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
pre-commit
|
||||
Reference in New Issue
Block a user