Wuyunfan-BUPT is testing out GitHub Actions π #302
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: GitHub Actions Demo | ||
run-name: ${{ github.actor }} is testing out GitHub Actions π | ||
on: [push] | ||
env: | ||
DOCKER_REPO: wuyfeehub/nacos-ci | ||
TEST_REPO_NAME: Wuyunfan-BUPT/nacos-e2e | ||
VERSION: $(${{ github.event.pull_request.number || github.ref_name }}-$(uuidgen)) | ||
jobs: | ||
prejob: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: echo | ||
run: | | ||
echo "hello" | ||
e2e-java-test: | ||
if: ${{ success() }} | ||
name: Java e2e Test | ||
needs: [prejob] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 60 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
mode: ["cluster","standalone","standalone_auth"] | ||
version: ['pp', 'ss'] | ||
steps: | ||
- name: java e2e test | ||
run: | | ||
Check failure on line 30 in .github/workflows/github-actions-demo.yml GitHub Actions / GitHub Actions DemoInvalid workflow file
|
||
if [[ ${{ matrix.mode }} == "standalone"* ]];then | ||
if [[ ${{ matrix.mode }} = "standalone_auth" ]]; then | ||
echo "standalone_auth" | ||
else | ||
echo "stabdlone" | ||
fi | ||
else | ||
echo "cluster" | ||
fi | ||
echo ${{ matrix.mode }}-${{ matrix.version }} | ||
echo ${{ jobs.<job_id> }} | ||
if [ ${{ matrix.mode }} = "cluster" ] && [ ${{ matrix.version }} = "ss" ];then | ||
exit 1 | ||
else | ||
exit 0 | ||
fi | ||
getresult: | ||
if: ${{ always() }} | ||
needs: [prejob, e2e-java-test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: echo result | ||
run: | | ||
echo ${{ needs.e2e-java-test.result }} | ||
echo ${{ needs.e2e-java-test.result }} |