Add command to download and install binaries from CLI #196
Workflow file for this run
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: CLI Tests and Linting | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.3' | |
bundler-cache: true | |
- name: Run Rubocop | |
run: bundle exec rubocop --parallel | |
test: | |
name: Test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
ruby-version: ['3.3.3'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run Minitest tests | |
run: | | |
bundle exec rake test TESTOPTS="--verbose" | |
env: | |
MINITEST_REPORTER: ProgressReporter | |
integration: | |
name: CLI Integration | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.3.3' | |
bundler-cache: true | |
- name: Create test images directory | |
run: | | |
mkdir -p test/fixtures/snapshots | |
# Create a simple test PNG file | |
convert -size 100x100 xc:white test/fixtures/snapshots/test1.png | |
convert -size 200x200 xc:blue test/fixtures/snapshots/test2.png | |
- name: Run CLI command | |
env: | |
EMERGE_API_TOKEN: ${{ secrets.EMERGE_API_TOKEN }} | |
run: | | |
bundle exec ruby exe/emerge upload snapshots \ | |
--name "Emerge CLI Test" \ | |
--id "com.emerge-cli.integration" \ | |
--repo-name "EmergeTools/emerge-cli" \ | |
--debug \ | |
test/fixtures/snapshots |