diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dc0d72c..e5856c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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 + \ No newline at end of file