Skip to content

Commit

Permalink
Add tests on GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
mziyut committed May 30, 2022
1 parent 2de3879 commit 5ff2c09
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 20 deletions.
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
day: "monday"
time: "11:00"
timezone: "Asia/Tokyo"
reviewers:
- "increments/shared-dev-team"
37 changes: 37 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Test

on:
pull_request:
push:
workflow_dispatch:
schedule:
- cron: "0 1 * * 1" # At 01:00 (UTC) / 10:00 (JST) on Monday

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [2.7]
node: [16, 17, 18]
env:
BUNDLE_GEMFILE: test.gemfile
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle install
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
cache: "npm"
- run: npm install
- run: npm run build
- run: npm run start &
- run: rake test
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Unreleased
=====

* Add tests on GitHub Actions [7](https://github.com/increments/camo/pull/7)

3.0.0
=====

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# camo [![Build Status](https://travis-ci.org/atmos/camo.svg?branch=master)](https://travis-ci.org/atmos/camo)
# camo [![Test](https://github.com/increments/camo/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/increments/camo/actions/workflows/test.yml)

Camo is all about making insecure assets look secure. This is an SSL image proxy to prevent mixed content warnings on secure pages served from [GitHub](https://github.com).

Expand Down
7 changes: 1 addition & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
file 'server.js' => 'server.coffee' do
sh "coffee -c -o . server.coffee"
end
task :build => 'server.js'

task :bundle do
sh("bundle install --gemfile test.gemfile")
end
Expand All @@ -12,7 +7,7 @@ task :test do
sh("BUNDLE_GEMFILE=test.gemfile bundle exec ruby test/proxy_test.rb")
end

task :default => [:build, :bundle, :test]
task :default => [:bundle, :test]

Dir["tasks/*.rake"].each do |f|
load f
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "3.0.0",
"dependencies": {},
"engines": {
"node": "^16"
"node": "^16 || ^17 || ^18"
},
"scripts": {
"build": "coffee -c server.coffee"
Expand Down

0 comments on commit 5ff2c09

Please sign in to comment.