fix: remove redundant line #73
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Report | |
on: | |
push: | |
branches: | |
- main | |
# permissions: | |
# issues: write | |
jobs: | |
test-js: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-versioin: '17' | |
- name: Install dependencies | |
run: | | |
cd javascript | |
npm install | |
- name: Run tests JS | |
id: run-tests-js | |
run: | | |
cd javascript | |
npm test | |
test-zig: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Zig using Snap | |
run: sudo snap install zig --classic --beta | |
- name: Run tests Zig | |
id: run-tests-zig | |
run: zig test zig/index.zig | |
create-issue-js: | |
needs: test-js | |
name: Create Issue for JS Failure | |
if: ${{ failure() && needs.test-js.result == 'failure' }} | |
uses: alex1yaremchuk/first-pull-request/.github/workflows/create-issue.yml@main | |
with: | |
label: "javascript" | |
label_upper: "JAVASCRIPT" | |
secrets: | |
FIRST_PR_PAT: ${{ secrets.FIRST_PR_PAT }} | |
create-issue-zig: | |
needs: test-zig | |
name: Create Issue for Zig Failure | |
if: ${{ failure() && needs.test-zig.result == 'failure' }} | |
uses: alex1yaremchuk/first-pull-request/.github/workflows/create-issue.yml@main | |
with: | |
label: "zig" | |
label_upper: "ZIG" | |
secrets: | |
FIRST_PR_PAT: ${{ secrets.FIRST_PR_PAT }} | |
zig-build-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: refs/heads/main | |
- name: Install Zig using Snap | |
run: | | |
sudo snap install zig --classic --beta | |
- name: Config, Prepare branch | |
run: | | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git checkout gh-pages || git checkout -b gh-pages | |
git merge main --no-edit | |
- name: Compile to WebAssembly | |
run: | | |
zig build | |
- name: Commit built files to gh-pages | |
run: | | |
cp zig-out/bin/index.wasm . | |
git add index.wasm | |
git commit --allow-empty -m 'Update built index.wasm file' | |
git push origin gh-pages | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |