Skip to content

Commit

Permalink
git hub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joeferner committed Nov 24, 2023
1 parent 4f3a648 commit e03a958
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# These files will be normalized on commit (CRLF converted to LF) - asterisk is a wildcard
* text eol=lf

# These files will NOT be normalized
*.png -text
*.gif -text
*.jpg -text
*.jpeg -text
*.ico -text
21 changes: 21 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: master
on:
push:
branches:
- master
jobs:
unit-test:
name: Unit Test
runs-on: ubuntu-latest
strategy:
matrix:
nodeVersion: [ 16, 18, 20 ]
jdkVersion: [ openjdk9, openjdk10, openjdk11, openjdk21 ]
steps:
- name: Checkout source code
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.nodeVersion }}
- name: Unit test with code coverage analysis
run: npm test
35 changes: 35 additions & 0 deletions .github/workflows/pull-requests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Pull Requests
on:
pull_request:
types: [opened, edited, reopened, synchronize]
branches:
- master
jobs:
unit-test:
name: Unit Test with Code Coverage Analysis
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up the Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
with:
version: latest
- name: Check for formatting issues
run: cargo make format-ci
- name: Check for linting issues
run: cargo make lint
- name: Unit test with code coverage analysis
run: cargo make test-coverage-ci
- name: Upload test coverage report to Codecov
uses: codecov/codecov-action@v3
with:
# We specify the token below to mitigate the impact of the bug mentioned here:
# https://community.codecov.com/t/upload-issues-unable-to-locate-build-via-github-actions-api/3954
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
files: lcov.info

0 comments on commit e03a958

Please sign in to comment.