Skip to content

Commit

Permalink
github: Add ci-tests GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tjanez committed Jan 4, 2023
1 parent 6b2ed76 commit d02da4d
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# NOTE: This name appears in GitHub's Checks API and in workflow's status badge.
name: ci-tests

# Trigger the workflow when:
on:
# A push occurs to one of the matched branches.
push:
branches:
- master
- stable/*
# Or when a pull request event occurs for a pull request against one of the
# matched branches.
pull_request:
branches:
- master
- stable/*

jobs:
tests:
# NOTE: This name appears in GitHub's Checks API.
name: tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: "1.17.x"
- name: Cache Go dependencies
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build code
run: |
make build
- name: Run tests
run: |
make test
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Oasis CLI

[![CI tests status][github-ci-tests-badge]][github-ci-tests-link]
[![CI lint status][github-ci-lint-badge]][github-ci-lint-link]
<!-- markdownlint-disable line-length -->
[github-ci-tests-badge]: https://github.com/oasisprotocol/cli/workflows/ci-tests/badge.svg
[github-ci-tests-link]: https://github.com/oasisprotocol/cli/actions?query=workflow:ci-tests+branch:master
[github-ci-lint-badge]: https://github.com/oasisprotocol/cli/workflows/ci-lint/badge.svg
[github-ci-lint-link]: https://github.com/oasisprotocol/cli/actions?query=workflow:ci-lint+branch:master
<!-- markdownlint-enable line-length -->
Expand Down

0 comments on commit d02da4d

Please sign in to comment.