Skip to content

Create workflows that test different integrations from demo project #8

Create workflows that test different integrations from demo project

Create workflows that test different integrations from demo project #8

name: Test Coverage-Reporter
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build_and_test:
name: Test on Ubuntu 22.04
runs-on: ubuntu-22.04
strategy:
matrix:
arch: [x86_64, aarch64]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7.7
bundler-cache: true
- name: Install Ruby dependencies
run: bundle install
- name: Run Tests
run: bundle exec rspec
# For pre-release testing only
- name: Install GitHub CLI
run: sudo apt-get install gh -y
# For pre-release testing only
- name: Download x86_64 artifact
run: |
gh run download 10950279748 --name coveralls-linux-x86_64 --dir ./
# For pre-release testing only
# Conditionally download and run based on architecture
- name: Download the correct binary
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
gh run download 10950279748 --name coveralls-linux-x86_64 --dir ./;
elif [ "${{ matrix.arch }}" = "aarch64" ]; then
gh run download 10950279748 --name coveralls-linux-aarch64 --dir ./;
fi
- name: Unzip and run the correct binary
run: |
if [ "${{ matrix.arch }}" = "x86_64" ]; then
unzip coveralls-linux-x86_64.zip;
./coveralls-linux-x86_64;
elif [ "${{ matrix.arch }}" = "aarch64" ]; then
unzip coveralls-linux-aarch64.zip;
./coveralls-linux-aarch64;
fi
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}