Skip to content

Commit

Permalink
Create build_and_test_ext.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
admeeer committed Oct 13, 2023
1 parent 7edfc6d commit 1018f2f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build_and_test_ext.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# See https://docs.github.com/en/actions/learn-github-actions/understanding-github-actions
name: build-and-test_art # The name of our workflow

# See https://docs.github.com/en/actions/using-workflows/triggering-a-workflow
on:
push: # Run workflow only on push
branches: # Run workflow only on push to branch
- main

jobs: # A job is a set of steps that execute on the same runner, a small remote virtual machine, see https://docs.github.com/en/actions/using-jobs/using-jobs-in-a-workflow
build_and_test: # Name our job
runs-on: ubuntu-latest # Define our OS

steps: # Define our job steps, steps are ran sequentially and are dependent on each other
- uses: actions/checkout@v4 # Call a predefined GitHub Action that git checks-out the main branch, see https://github.com/actions/checkout

- name: setup # Define a step, 'setup', that sets the workflow runner up
uses: actions/setup-python@v3 # Call a predefined GitHub Action that setups a python environment, see https://github.com/actions/setup-python
with:
python-version: 3.9 # Define our python version

- name: install # Define a step, 'install' that installs our dependencies
run: | # Run these bash commands
python3 -m pip install --upgrade pip
pip3 install pytest
- name: test # Define a step, 'test', that runs our testing framework
run: | # Run pytest with verbosity and send its output to both the console and a file, located in tests/test_output.txt
pytest -v tests/ | tee tests/test_output.txt
- name: upload test artifacts # Define a step, 'upload test artifacts" that extracts our pytest output as artifacts
uses: actions/upload-artifact@v2 # Call a predefined GitHub Action that uploads defined artifacts, see https://github.com/actions/upload-artifact
with:
name: test-output # What we'll call the artifacts on GitHub
path: tests/test_output.txt # Path to the artifacts

0 comments on commit 1018f2f

Please sign in to comment.