Skip to content

Commit

Permalink
Merge pull request #1 from c-tuck/feat/test-gha
Browse files Browse the repository at this point in the history
ci: test gha
  • Loading branch information
c-tuck authored Jul 27, 2022
2 parents 1e14639 + 48c1ad4 commit 60fdf96
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 4 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Test Github Actions - PR

on:
pull_request:
branches: [ main ]

jobs:
test_github_actions_pr:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [16.x]
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com
- run: echo ${{ github.ref }}
- run: echo ${{ github.base_ref }}
- run: echo ${{ github.head_ref }}
- run: echo ${GITHUB_REF}
- run: echo ${GITHUB_REF##*/}
- run: echo ${GITHUB_BASE_REF}
- run: echo ${GITHUB_BASE_REF##*/}
- run: echo ${GITHUB_HEAD_REF}
- run: echo ${GITHUB_HEAD_REF##*/}
- run: git branch --show-current
- run: env
- name: Install Deps
run: npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Program
run: node .
19 changes: 15 additions & 4 deletions .github/workflows/packages.yml → .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
name: Test Github Packages
name: Test Github Packages - Push

on:
push:
branches: [ main ]

jobs:
test_github_packages:
test_github_actions_push:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [16.x]
steps:
- name: Checkout repository code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com
- run: echo ${{ github.ref }}
- run: echo ${{ github.base_ref }}
- run: echo ${{ github.head_ref }}
- run: echo ${GITHUB_REF}
- run: echo ${GITHUB_REF##*/}
- run: echo ${GITHUB_BASE_REF}
- run: echo ${GITHUB_BASE_REF##*/}
- run: echo ${GITHUB_HEAD_REF}
- run: echo ${GITHUB_HEAD_REF##*/}
- run: git branch --show-current
- run: env
- name: Install Deps
run: npm ci --ignore-scripts
env:
Expand Down
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Test Github Actions - Release

on:
release:
types: [published]

jobs:
test_github_actions_release:
runs-on: ubuntu-latest
strategy:
matrix:
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
node-version: [16.x]
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
always-auth: true
node-version: ${{ matrix.node-version }}
registry-url: https://npm.pkg.github.com
- run: echo ${{ github.ref }}
- run: echo ${{ github.base_ref }}
- run: echo ${{ github.head_ref }}
- run: echo ${GITHUB_REF}
- run: echo ${GITHUB_REF##*/}
- run: echo ${GITHUB_BASE_REF}
- run: echo ${GITHUB_BASE_REF##*/}
- run: echo ${GITHUB_HEAD_REF}
- run: echo ${GITHUB_HEAD_REF##*/}
- run: git branch --show-current
- run: env
- name: Install Deps
run: npm ci --ignore-scripts
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Program
run: node .


0 comments on commit 60fdf96

Please sign in to comment.