Skip to content

Commit

Permalink
Separated both jobs(fixes metacall#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeeManSu committed Aug 24, 2024
1 parent 93b28ae commit 40f1d3c
Showing 1 changed file with 37 additions and 13 deletions.
50 changes: 37 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ concurrency:
cancel-in-progress: true

jobs:
ci:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{matrix.os}}
ci-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -46,22 +43,49 @@ jobs:
# run: |
# npm run test

- name: Setup MetaCall CLI (unix)
if: matrix.os == 'ubuntu-latest'
- name: Setup MetaCall CLI
run: wget -O - https://raw.githubusercontent.com/metacall/install/master/install.sh | sh

- name: Setup MetaCall CLI (windows)
if: matrix.os == 'windows-latest'
run: |
cmd.exe /c "powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/metacall/install/master/install.ps1')))""
- name: Run Integration Tests
shell: bash
run: ./test.sh

- name: Publish
uses: JS-DevTools/npm-publish@v3
if: startsWith(github.ref, 'refs/tags/') && matrix.os == 'ubuntu-latest'
if: startsWith(github.ref, 'refs/tags/')
with:
access: 'public'
token: ${{ secrets.NPM_AUTH_TOKEN }}

ci-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup NodeJS
uses: actions/setup-node@v4
with:
node-version: '18'
registry-url: https://registry.npmjs.org

- name: Update NPM
run: npm install -g npm@latest

- name: Installing Dependencies
run: npm i

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Setup MetaCall CLI
run: |
cmd.exe /c "powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://raw.githubusercontent.com/metacall/install/master/install.ps1')))""
- name: Run Integration Tests
shell: bash
run: ./test.sh

0 comments on commit 40f1d3c

Please sign in to comment.