Skip to content

Commit

Permalink
Forgot to re-add the files that were renamed.
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Liang committed Nov 21, 2024
1 parent 0b5767b commit b2ada0f
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/build_and_publish_gem.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Build and publish the Ruby package

on:
release:
types: [published]

jobs:
build_gem:
runs-on: ubuntu-latest
steps:
- name: Checkout code from repo
uses: actions/checkout@v3

- name: Log into GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build devcontainer and build the package
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/cfe-lab/gotoh_devcontainer
cacheFrom: ghcr.io/cfe-lab/gotoh_devcontainer
runCmd: cd /workspaces/gotoh/ruby && bash build_gem.bash
env: |
CFE_GOTOH_VERSION=${{ github.ref_name }}
- name: Publish gem to Github Packages
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
env:
GEM_HOST_API_KEY: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
37 changes: 37 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Automated Tests

on: ["push"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code from repo
uses: actions/checkout@v3

- name: Log into GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build devcontainer and run tests
uses: devcontainers/[email protected]
with:
imageName: ghcr.io/cfe-lab/gotoh_devcontainer
cacheFrom: ghcr.io/cfe-lab/gotoh_devcontainer
runCmd: cd /workspaces/gotoh/ruby && rake test
env: |
CI_COMMIT_REF=${{ github.ref_name }}
CI_COMMIT_SHA=${{ github.sha }}
CI_PIPELINE_ID=${{ github.run_id }}
CI_COMMIT_BRANCH=${{ github.ref_name }}
CI_PROJECT=${{ github.repository }}
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
root_dir: ${{ github.workspace }}
files: ${{ github.workspace }}/ruby/coverage/coverage.xml

0 comments on commit b2ada0f

Please sign in to comment.