-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: add GitHub workflows to validate PRs and pushes to main
- Loading branch information
1 parent
e9336cd
commit 946a444
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
pull_request: | ||
branches: [ 'main' ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.0' | ||
bundler-cache: true | ||
|
||
- name: Run RuboCop | ||
run: bundle exec rubocop |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: [ 'main' ] | ||
pull_request: | ||
branches: [ 'main' ] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
ruby-version: ['2.6', '2.7', '3.0'] | ||
ffmpeg-version: ['6.0.1', '5.1.1', '4.4.1', '3.4.2'] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: ${{ matrix.ruby-version }} | ||
bundler-cache: true | ||
|
||
- name: Install FFMPEG | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y wget | ||
wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static.tar.xz | ||
tar -xf ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static.tar.xz | ||
sudo mv ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static/ffmpeg /usr/local/bin/ffmpeg | ||
sudo mv ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static/ffprobe /usr/local/bin/ffprobe | ||
rm -rf ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static.tar.xz ffmpeg-${{ matrix.ffmpeg-version }}-amd64-static | ||
- name: Run RSpec | ||
run: bundle exec rspec |